A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-November/150651.html below:

[Python-Dev] Comment on PEP 562 (Module __getattr__ and __dir__)

[Python-Dev] Comment on PEP 562 (Module __getattr__ and __dir__) [Python-Dev] Comment on PEP 562 (Module __getattr__ and __dir__)Serhiy Storchaka storchaka at gmail.com
Mon Nov 20 03:33:03 EST 2017
20.11.17 03:02, Guido van Rossum пише:
> Serhiy's definition sounds recursive (defining __getattr__ to define the 
> behavior of __getattr__) but Mark's suggestion makes his intention 
> unclear since the error message is still the same.

It is recursive only when the '__dict__' attribute is not defined. I 
assumed that it is defined for simplicity. And if isn't defined 
hasattr(self, '__dict__') will cause a recursion too.

In any case the real C code handles this more carefully and effectively.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4