A better self
Delaney, Timothy
tdelaney at avaya.com
Sun Jul 21 20:01:41 EDT 2002
> 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
> to look at the various methods, already compiled down to
> bytecode... and change the bytecode as needed, i.e., each
> of the various LOAD_GLOBAL, STORE_FAST, LOAD_FAST, would be
> checked to see if the name it refers to is in __slots__, and,
> if so, transformed into LOAD_FAST+LOAD_ATTR, or LOAD_FAST+
> STORE_ATTR. Of course, all the arguments of the various
> JUMP_* operators would have to be adjusted as the code's
Wouldn't work in Jython ... (when Jython gets to 2.2 ...).
Tim Delaney
More information about the Python-list
mailing list