I'm a python addict !
J. Cliff Dyer
jcd at sdf.lonestar.org
Mon Jan 26 22:38:08 CET 2009
On Mon, 2009-01-26 at 12:37 -0800, Paul McGuire wrote:
> On Jan 26, 2:06 pm, "J. Cliff Dyer" <j... at sdf.lonestar.org> wrote:
> > Thanks. That makes sense. But your example creates a new instance of
> > the new class each time, rather than changing the class of a persistent
> > instance, as the original example, to which I was responding, did.
> Look closer. The line that creates a new instance is commented out,
> with the notation "how you have to do it in C++ and Java". The actual
> Python code is just below, and just assigns a new class to
> self.__class__, as in the original example.
Right. Sorry about that.
> -- Paul
More information about the Python-list