Module prototypes :: Class LIST
[hide private]
[frames] | no frames]

Class LIST

source code

       object --+    
                |    
BaseProtogenClass --+
                    |
                   LIST

A list of items

You can generally treat this class as though it is a list. Note that some list like methods haven't been implemented (there are so darn many!) If you are missing one you want to use, please add it to this class.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
You can pass objects to start the list with, or to the value keyword arg
source code
 
_update(self, args, kwargs) source code
 
readfrombuffer(self, buf)
Get our value from the buffer
source code
 
writetobuffer(self, buf)
Scribble ourselves to the buf
source code
 
packetsize(self)
Returns size in bytes that we occupy
source code
 
iscontainer(self)
Do we contain fields?
source code
 
containerelements(self) source code
 
append(self, item) source code
 
extend(self, items) source code
 
insert(self, index, item) source code
 
__getitem__(self, index) source code
 
__iter__(self) source code
 
__fallbackiter(self) source code
 
__len__(self) source code
 
__setitem__(self, index, value) source code
 
__delitem__(self, index) source code
 
_makeitem(self, *args, **kwargs)
Creates a child element
source code
 
_ensurelength(self)
Ensures we are the correct length
source code

Inherited from BaseProtogenClass: autologread, autologwrite, getvalue, packetspan, update

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

You can pass objects to start the list with, or to the value keyword arg

Parameters:
  • createdefault - (Default False) Creates default members of the list if enough were not supplied before writing.
  • length - (Optional) How many items there are in the list
  • raiseonbadlength - (Default True) raises ValueLengthException if there are the wrong number of items in the list. Note that this checking is only done when writing or reading from a buffer. length must be set for this to have any effect. If you have createdefault set then having less than length elements will not cause the exception.
  • elementclass - (Mandatory) The class of each element
  • elementinitkwargs - (Optional) KWargs for the constructor of each element
  • value - (Optional) Value
Overrides: object.__init__

_update(self, args, kwargs)

source code 
Overrides: BaseProtogenClass._update

readfrombuffer(self, buf)

source code 

Get our value from the buffer

Overrides: BaseProtogenClass.readfrombuffer
(inherited documentation)

writetobuffer(self, buf)

source code 

Scribble ourselves to the buf

Overrides: BaseProtogenClass.writetobuffer
(inherited documentation)

packetsize(self)

source code 

Returns size in bytes that we occupy

Overrides: BaseProtogenClass.packetsize
(inherited documentation)

iscontainer(self)

source code 

Do we contain fields?

Overrides: BaseProtogenClass.iscontainer
(inherited documentation)