id() collisions on bound methods [was: metaclass and customization with parameters]
greg at cosc.canterbury.ac.nz
Thu Oct 7 05:57:55 CEST 2004
Jeff Epler wrote:
> In the Olden Days, "caching" bound methods would have led to cycles
> that were never collected. Nowadays, there's a cyclic GC collector,
> so if that was the killer for this idea maybe it's worth revisiting.
Alternatively, creation of the bound method could be skipped
altogether in the case where it's going to be immediately called.
This could be achieved by having
generate a single CALL_METHOD opcode instead of an attribute
lookup followed by a call.
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
More information about the Python-list