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)
Parameters: - graph: the graph containing the Seq - subject: the subject of a Seq.
  __getitem__(self, index)
Item given by index from the Seq
  __iter__(self)
Generator over the items in the Seq
  __len__(self)
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)

Method Details

__init__(self, graph, subject)
(Constructor)

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)

Item given by index from the Seq

__iter__(self)

Generator over the items in the Seq

__len__(self)
(Length operator)

Length of the Seq

Generated by Epydoc 2.1 on Mon Oct 23 14:11:24 2006 http://epydoc.sf.net