Some language proposals.

Jacek Generowicz jacek.generowicz at cern.ch
Thu Feb 26 02:40:36 EST 2004


aahz at pythoncraft.com (Aahz) writes:

> In article <tyfwu6bmfhx.fsf at pcepsft001.cern.ch>,
> Jacek Generowicz  <jacek.generowicz at cern.ch> wrote:
> >
> >Sure. I have some stateful methods of classes (which I create
> >dynamically and stick onto the class as the information about the
> >existence of the method becomes available). By implementing them as
> >closures I can just stick them on to the class. If I were to implement
> >them as instances then I'd have to reimplement all the descriptors
> >that take care of turning functions into bound or unbound methods.
> 
> Why not use callable instances?

Errrrr ...

Reading the paragraph you quoted and trying to understand it is left
as an exercise to you. (Hint: it's the last sentence.)



More information about the Python-list mailing list