Package cssutils :: Module util :: Class Seq
[hide private]
[frames] | no frames]

Class Seq

source code

object --+
         |
        Seq

(EXPERIMENTAL) a list like sequence of (value, type) used in some cssutils classes as property seq

behaves almost like a list but keeps extra attribute "type" for each value in the list

types are tokens types like e.g. "COMMENT" (value='/.../', all uppercase) or productions like e.g. "universal" (value='*', all lowercase)



Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__contains__(self, item) source code
 
__delitem__(self, index) source code
 
__getitem__(self, index) source code
 
__setitem__(self, index, value_type)
might be set with tuple (value, type) or a single value
source code
 
__iter__(self)
returns an iterator of values only
source code
 
__len__(self)
same as len(list)
source code
 
__repr__(self)
returns a repr same as a list of tuples of (value, type)
source code
 
__str__(self)
returns a concanated string of all values
source code
 
append(self, value, type=None)
same as list.append but not a simple value but a SeqItem is appended
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
returns a repr same as a list of tuples of (value, type)
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
returns a concanated string of all values
Overrides: object.__str__