Package rdflib :: Module Graph :: Class Seq
[show private | hide private]
[frames | no frames]

Type Seq

object --+
         |
        Seq


Wrapper around an RDF Seq resource. It implements a container type in Python with the order of the items returned corresponding to the Seq content. It is based on the natural ordering of the predicate names _1, _2, _3, etc, which is the 'implementation' of a sequence in RDF terms.
Method Summary
  __init__(self, graph, subject)
The graph which contains the sequence.
  __getitem__(self, index)
Returns the item given by index from the Seq.
  __iter__(self)
Generator over the index, item tuples in the Seq
  __len__(self)
Returns the length of the Seq.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
dict _list = {}

Method Details

__init__(self, graph, subject)
(Constructor)

The graph which contains the sequence. The subject is
simply the subject which is supposed to be a Seq.

Parameters:
-----------
graph: the graph containing the Seq
subject: the subject of a Seq. Note that the init does not
check whether this is a Seq, this is done in whoever
creates this instance!
Overrides:
__builtin__.object.__init__

__getitem__(self, index)
(Indexing operator)

Returns the item given by index from the Seq.

__iter__(self)

Generator over the index, item tuples in the Seq

__len__(self)
(Length operator)

Returns the length of the Seq.

Class Variable Details

_list

Type:
dict
Value:
{}                                                                     

Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 http://epydoc.sf.net