subclassing tuple

Erik Max Francis max at alcyone.com
Tue Sep 17 17:21:37 EDT 2002


Douglas Zongker wrote:

> Is there any way to create a subclass of 'tuple' that has a customized
> constructor?

You want to use the .__new__ method:

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

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ It's like being on a diving board that you know is too high.
\__/ Sade Adu
    Kepler's laws / http://www.alcyone.com/max/physics/kepler/
 A proof of Kepler's laws.



More information about the Python-list mailing list