[Python-Dev] Python-dev Summary for 2002-09-16 to 2002-09-30 (original) (raw)

Guido van Rossum guido@python.org
Tue, 01 Oct 2002 09:50:18 -0400


> ================================================= > builtins instance have modifiable _class_?_ > ================================================= > _ http://mail.python.org/pipermail/python-dev/2002-September/028978.html > > Samuele Pedroni asked if being able to directly assigning to class was > allowed. Guido said "In 2.3, it's disallowed". It is highly discouraged > in 2.2.2 but still doable.

my question and the limitation refer only to builtin types (int,dict ...), for instances of (user-defined) subtypes class will be still modifiable.

Yes, setting class for instances of user-defined new-style classes will be allowed (if the new class value is compatible with the old).

--Guido van Rossum (home page: http://www.python.org/~guido/)