On 10/25/2010 7:38 AM, Tim Chase wrote:
While a dirty hack for which I'd tend to smack anybody who used it...you *can* assign to instance.__class__
That's an implementation detail of CPython. May not work in IronPython, Unladen Swallow, PyPy, or Shed Skin.
(An implementation with a JIT has to trap stores into some internal variables and invalidate the generated code. This adds considerable complexity to the virtual machine. Java JVMs, for example, don't have to support that.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list