On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote:
> Want to change the type/behavior of an object from class A to class
> B?  How about this:
> 
>     aobj = A()
>     aobj.__class__ = B
> 
> Try *that* in as simple-looking C++ or Java!

Wow.  That looks very powerful and fun.  But scary.  Any thoughts on how
you would use that in a way that wouldn't unleash sulphurous code
smells?

Cheers,
Cliff


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to