Package cssutils :: Package css :: Module cssrulelist :: Class CSSRuleList
[hide private]
[frames] | no frames]

Class CSSRuleList

source code

object --+    
         |    
      list --+
             |
            CSSRuleList

The CSSRuleList object represents an (ordered) list of statements.

The items in the CSSRuleList are accessible via an integral index, starting from 0.

Subclasses a standard Python list so theoretically all standard list methods are available. Setting methods like __init__, append, extend or __setslice__ are added later on instances of this class if so desired. E.g. CSSStyleSheet adds append which is not available in a simple instance of this class!

Properties

length: of type unsigned long, readonly
The number of CSSRules in the list. The range of valid child rule indices is 0 to length-1 inclusive.
Instance Methods [hide private]
new list
__init__(self, *ignored)
nothing is set as this must also be defined later
source code
 
__notimplemented(self, *ignored)
no direct setting possible
source code
 
__setslice__(self, *ignored)
no direct setting possible
source code
 
__setitem__(self, *ignored)
no direct setting possible
source code
 
extend(self, *ignored)
no direct setting possible
source code
 
append(self, *ignored)
no direct setting possible
source code
 
item(self, index)
(DOM) Used to retrieve a CSS rule by ordinal index.
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, count, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]
  length
(DOM) The number of CSSRules in the list.

Inherited from object: __class__

Method Details [hide private]

__init__(self, *ignored)
(Constructor)

source code 
nothing is set as this must also be defined later
Returns: new list
Overrides: object.__init__

__setslice__(self, *ignored)
(Slice assignment operator)

source code 
no direct setting possible
Overrides: list.__setslice__

__setitem__(self, *ignored)
(Index assignment operator)

source code 
no direct setting possible
Overrides: list.__setitem__

extend(self, *ignored)

source code 
no direct setting possible
Overrides: list.extend

append(self, *ignored)

source code 
no direct setting possible
Overrides: list.append

item(self, index)

source code 

(DOM) Used to retrieve a CSS rule by ordinal index. The order in this collection represents the order of the rules in the CSS style sheet. If index is greater than or equal to the number of rules in the list, this returns None.

Returns CSSRule, the style rule at the index position in the CSSRuleList, or None if that is not a valid index.


Property Details [hide private]

length

(DOM) The number of CSSRules in the list.
Get Method:
unreachable(self)