Home | Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|
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 |
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 |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Feb 4 22:00:34 2009 | http://epydoc.sourceforge.net |