home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1575 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.8 KB  |  38 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. __all__ = [
  5.     'CSSRuleList']
  6. __docformat__ = 'restructuredtext'
  7. __version__ = '$Id: cssrulelist.py 1913 2010-03-14 17:50:53Z cthedot $'
  8.  
  9. class CSSRuleList(list):
  10.     
  11.     def __init__(self, *ignored):
  12.         pass
  13.  
  14.     
  15.     def __notimplemented(self, *ignored):
  16.         raise NotImplementedError('Must be implemented by class using an instance of this class.')
  17.  
  18.     append = extend = __setitem__ = __setslice__ = __notimplemented
  19.     
  20.     def item(self, index):
  21.         
  22.         try:
  23.             return self[index]
  24.         except IndexError:
  25.             return None
  26.  
  27.  
  28.     length = property((lambda self: len(self)), doc = '(DOM) The number of CSSRules in the list.')
  29.     
  30.     def rulesOfType(self, type):
  31.         for r in self:
  32.             if r.type == type:
  33.                 yield r
  34.                 continue
  35.         
  36.  
  37.  
  38.