Home | Trees | Indices | Help |
|
---|
|
object --+ | ilwdchar
RAM-efficient row ID parent class. This is only useful when subclassed in order to provide specific values of the class attributes "table_name" and "column_name". The attributes must be unicode objects.
Example:
>>> class ID(ilwdchar): ... __slots__ = () ... table_name = u"table_a" ... column_name = u"column_b" ... >>> x = ID(10) >>> print(x) table_a:column_b:10 >>> print(x + 35) table_a:column_b:45 >>> y = ID(10) >>> print(x - y) table_a:column_b:0 >>> x == y True >>> x is y False >>> len(set([x, y])) 1
Note that the two instances have the same hash value and compare as equal, and so only one of them remains in the set although they are not the same object.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
a new object with type S, a subtype of T |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
hash(x)
|
|
str(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 12 00:34:18 2017 | http://epydoc.sourceforge.net |