[Python-3000] [Python-Dev] PEP 367: New Super (original) (raw)
Tim Delaney timothy.c.delaney at gmail.com
Sun May 27 13:09:22 CEST 2007
- Previous message: [Python-3000] [Python-Dev] PEP 367: New Super
- Next message: [Python-3000] [Python-Dev] PEP 367: New Super
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
The bound method object isn't stored in the class -- it's created by the "C.method" or "inst.method" getattr operation. I don't see how this would introduce a cycle.
If we store the class, we can store it as a weakref - the when the super object is created, a strong reference to the class exists.
We need to create some relationship between the unbound method and the class. So the class has a reference to the unbound method, and the unbound method has a reference to the class, thus creating a cycle. Bound methods don't come into it - it's the unbound method that's the problem.
Since class and type are synonym (as you say) having both imclass and imtype would be a bad idea.
I'm struggling to think of another, not too complicated name that conveys the same information.
Tim Delaney
- Previous message: [Python-3000] [Python-Dev] PEP 367: New Super
- Next message: [Python-3000] [Python-Dev] PEP 367: New Super
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]