[Python-ideas] LOAD_NAME/LOAD_GLOBAL should be use getattr()
Lucas Wiman
lucas.wiman at gmail.com
Wed Sep 13 16:07:41 EDT 2017
On Wed, Sep 13, 2017 at 11:55 AM, Serhiy Storchaka <storchaka at gmail.com>
wrote:
> [...] Calling __getattr__() will slow down the access to builtins. And
> there is a recursion problem if module's __getattr__() uses builtins.
>
The first point is totally valid, but the recursion problem doesn't seem
like a strong argument. There are already lots of recursion problems when
defining custom __getattr__ or __getattribute__ methods, but on balance
they're a very useful part of the language.
- Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170913/3e095409/attachment-0001.html>
More information about the Python-ideas
mailing list