[Python-3000] Bound and unbound methods
greg.ewing at canterbury.ac.nz
Mon Aug 14 04:31:46 CEST 2006
> the compiler would note the combination of the attribute access and the
> call, and combine them into an opcode that skips the whole method
> creation step.
Something like that could probably be made to work. You'd
want to be careful to do the optimisation only when the
attribute in question is an ordinary attribute, not
a property or other descriptor.
I'm also -1 on eliminating bound methods entirely.
I worked through that idea in considerable depth during my
discussions with the author of Prothon, which was also to
have been without any notion of bound methods. The
consequences are further-reaching than you might think at
first. The bottom line is that without bound methods,
Python wouldn't really be Python any more.
More information about the Python-3000