[Python-Dev] special method lookup: how much do we care?

Daniel Stutzbach daniel at stutzbachenterprises.com
Sat May 9 01:10:53 CEST 2009


On Fri, May 8, 2009 at 1:09 PM, Benjamin Peterson <benjamin at python.org>wrote:

> I've know hit __enter__ and __exit__. The compiler
> generates LOAD_ATTR instructions for these, so it uses the normal
> lookup. The only way I can see to fix this is add a new opcode which
> uses _PyObject_LookupSpecial, but I don't think we really care this
> much. Opinions?
>

Why does this problem arise only with __enter__ and __exit__?

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090508/c644935e/attachment.htm>


More information about the Python-Dev mailing list