How to use "__new__"?

Terry Reedy tjreedy at
Wed Mar 30 05:06:40 CEST 2005

"could ildg" < at> wrote in message 
news:311b5ce105032917276a188c59 at
> __new__() is intended mainly to allow subclasses of immutable types
> (like int, str, or tuple) to customize instance creation.

Exactly.  It is an anwer to the conundrum: How do you give an immutable 
object its unchangeable value.  It is much like how to move an unmovable 
object to its permanent position ;-).


More information about the Python-list mailing list