Package fsa_recognizer :: Module supertuple
[hide private]
[frames] | no frames]

Module supertuple

source code

Functions [hide private]
 
superTuple(typename, *attribute_names)
create and return a subclass of `tuple', with named attributes Example: >>> Point = supertuple.superTuple('Point','x','y') >>> Point <class 'supertuple.Point'> >>> p = Point(1,2,3) # wrong number of fields Traceback (most recent call last): ...
source code
 
superTuplePlus(typename, *attribute_names)
create and return a subclass of `tuple', with named attributes Example: >>> Point = supertuple.superTuplePlus('Point','x','y') >>> Point <class 'supertuple.Point'> >>> p = Point(x=1,y=2,z=3) # wrong number of fields Traceback (most recent call last): ...
source code
Function Details [hide private]

superTuple(typename, *attribute_names)

source code 

create and return a subclass of `tuple', with named attributes Example: >>> Point = supertuple.superTuple('Point','x','y') >>> Point <class 'supertuple.Point'> >>> p = Point(1,2,3) # wrong number of fields Traceback (most recent call last): ... TypeError: Point exactly 2 arguments (3 given) >>> p = Point(1,2) # Do it right this time. >>> p Point(1,2) >>> print p.x, p.y 1 2

superTuplePlus(typename, *attribute_names)

source code 

create and return a subclass of `tuple', with named attributes Example: >>> Point = supertuple.superTuplePlus('Point','x','y') >>> Point <class 'supertuple.Point'> >>> p = Point(x=1,y=2,z=3) # wrong number of fields Traceback (most recent call last): ... TypeError: Point exactly 2 arguments (3 given) >>> p = Point(x=1,y=2) # Do it right this time. >>> p Point(1,2) >>> print p.x, p.y 1 2