Package parser_course :: Package small_parsers :: Module offset_list :: Class offsetList
[hide private]
[frames] | no frames]

Class offsetList

source code

object --+    
         |    
      list --+
             |
            offsetList
Known Subclasses:

Offset lists are lists with indexing offset by 1. With an offset list L, L[n] returns the nth member of the list rather than the (n+1)th member as with ordinary Python list indexing. >>> L = ['a','b','c'] >>> O = offsetList(L) >>> L[2] 'c' >>> O[2] 'b'

Instance Methods [hide private]
 
__getitem__(self, index)
x[y]
source code
 
__setitem__(self, index)
x[i]=y
source code

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

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getitem__(self, index)
(Indexing operator)

source code 

x[y]

Overrides: list.__getitem__
(inherited documentation)

__setitem__(self, index)
(Index assignment operator)

source code 

x[i]=y

Overrides: list.__setitem__
(inherited documentation)