. Python 2.1 function attributes
Sune Kirkeby
sune-news at mel.Interspace.dk
Mon Jan 29 16:29:29 EST 2001
[Roy Katz]
> Let's add bless(). I want to change the class of an object at
> runtime.
[ Moshe Zadka <moshez at zadka.site.co.il> ]
> You can already do this, and have been able to a long time.
>
> foo.__class__ = new_class
>
> Why would anyone want a new builtin for that?
Why would anyone want the syntactic (sp?) sugar that "print >>" is?
Probably because it's both simpler to use and easier to understand.
I would think you would understand that ;-)
--
Sune Kirkeby Test-tube babies shouldn't throw stones.
http://mel.interspace.dk/~sune/
More information about the Python-list
mailing list