Initializing subclasses of tuple

gry at ll.mit.edu gry at ll.mit.edu
Tue Mar 1 11:18:08 EST 2005


To inherit from an immutable class, like string or tuple, you need to
use the __new__ member, not __init__.  See, e.g.:

http://www.python.org/2.2.3/descrintro.html#__new__




More information about the Python-list mailing list