rdf namespace

6 views
Skip to first unread message

Kless

unread,
May 12, 2008, 4:10:50 AM5/12/08
to rdfalchemy-dev
The rdf namespace is being defined in rdfalchemy (again),

*RDF = rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#')*

but it's already defined in the rdflib module:

*RDF = rdflib.RDF.RDFNS*

and could be defined too:

*RDFS = rdflib.RDFS.RDFSNS*

Phil

unread,
May 12, 2008, 12:13:00 PM5/12/08
to rdfalchemy-dev


On May 12, 2:10 am, Kless <jonas....@googlemail.com> wrote:
> The rdf namespace is being defined in rdfalchemy (again),
>
> *RDF = rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#')*
>
> but it's already defined in the rdflib module:
>
> *RDF = rdflib.RDF.RDFNS*
>

Code cleanup, I could always use a little more :-)
the current rdfalchemy.__init__.py just imports RDF from rdflib.
It is a module and not a Namespace but that's better for a number of
reasons (speed, safety etc)

The only place where I think I redefine it now is in descriptors.py.
There I need the Namespace and NOT the module so that I can have RDF['_
%d'%i] for getting members of an RDFContainer.

--
Phil
Reply all
Reply to author
Forward
0 new messages