Is there a reason not to do this?

Ron Garret rNOSPAMon at flownet.com
Fri Dec 1 02:36:49 EST 2006


In article <mailman.916.1164955848.32031.python-list at python.org>,
 "Hendrik van Rooyen" <mail at microcorp.co.za> wrote:

>  "Ron Garret" <rNOSPAMon at flownet.com> wrote:
> 
> 
> >
> > One of the things I find annoying about Python is that when you make a
> > change to a method definition that change is not reflected in existing
> > instances of a class (because you're really defining a new class when
> > you reload a class definition, not actually redefining it).  So I came
> > up with this programming style:
> 
> I would have thought that not changing yesterday was the very essence of
> dynamism (dynamicness ??) - but that when you change something - it applies 
> from that point in time forwards...

I don't want to get into a philosophical debate.  I'll just point you to 
CLOS as an example of an object system that already works this way.

> What do you propose to do about the outputs from such classes that have 
> already happened?

The ability to change methods on the fly will be used mainly for 
debugging I expect.

rg



More information about the Python-list mailing list