A better self

Delaney, Timothy tdelaney at avaya.com
Mon Jul 22 02:34:51 EDT 2002


> From: Alex Martelli [mailto:aleax at aleax.it]
> 
> Delaney, Timothy wrote:
> 
> >> From: Alex Martelli [mailto:aleax at aleax.it]
> >> 
> >> The point is that SelferMeta.__new__ gets to look at all of
> >> class Myself's dictionary *and tamper with it as needed* before
> >> delegating the rest to class type.  Specifically, it would get
>         ...
> > Wouldn't work in Jython ... (when Jython gets to 2.2 ...).
> 
> Or more precisely: the bytecode manipulations needed will be specific
> to the underlying virtual machine.  I.e., unless a VM is designed in
> really crazy ways, it will probably be possible to use exactly the
> same technique (metaclass computing what bytecode is needed to achieve
> the desired results and substituting it in place of the bytecode as
> given), but the details of the transformations will change.

May I suggest that I was awed by the hack, and felt that my only possible
contribution was to point out the unfeasibility of such a method in case
anyone actually wanted to *do* something this perverse?

I mean - it was a truly evil suggestion, well and truly worthy of the
Martellibot :)

Tim Delaney





More information about the Python-list mailing list