Re: [Python-Dev] [Python-3000] PEP 367: New Super

Tim Delaney wrote:
Duh - I'm an idiot. Of course, the current behaviour uses name lookup, so it would use the decorated class. So the question is, should the method store the class, or the name? Looking up by name could pick up a totally unrelated class, but storing the undecorated class could miss something important in the decoration. Tim Delaney

Tim Delaney wrote:
Couldn't we provide a mechanism whereby the cell can be adjusted to point to the decorated class? (heck, the interpreter has access to both classes after execution of the class statement - it could probably arrange for this to happen automatically whenever the decorated and undecorated classes are different). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org

At 06:20 PM 5/20/2007 +1000, Tim Delaney wrote:
Btw, PEP 3124 needs a way to receive the same class object at more or less the same moment, although in the form of a callback rather than a cell assignment. Guido suggested I co-ordinate with you to design a mechanism for this.

Tim Delaney wrote:
Couldn't we provide a mechanism whereby the cell can be adjusted to point to the decorated class? (heck, the interpreter has access to both classes after execution of the class statement - it could probably arrange for this to happen automatically whenever the decorated and undecorated classes are different). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org

At 06:20 PM 5/20/2007 +1000, Tim Delaney wrote:
Btw, PEP 3124 needs a way to receive the same class object at more or less the same moment, although in the form of a callback rather than a cell assignment. Guido suggested I co-ordinate with you to design a mechanism for this.
participants (3)
-
Nick Coghlan
-
Phillip J. Eby
-
Tim Delaney