gry@ll.mit.edu wrote:
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__

Any volunteers out there willing to put some words about __new__ together for the main Python docs, please consider posting them on SF :)


It's currently conspicuous by its absence:
http://www.python.org/dev/doc/devel/ref/customization.html

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to