Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171119/ee25c346/attachment.html below:
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Nov 19, 2017 at 4:57 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Nov 19, 2017 at 08:24:00PM +0000, Mark Shannon wrote:<br>
> Just one comment. Could the new behaviour of attribute lookup on a<br>
> module be spelled out more explicitly please?<br>
><br>
><br>
> I'm guessing it is now something like:<br>
><br>
> `module.__getattribute__` is now equivalent to:<br>
><br>
> def __getattribute__(mod, name):<br>
>Â Â Â try:<br>
>Â Â Â Â Â return object.__getattribute__(mod, name)<br>
>Â Â Â except AttributeError:<br>
>Â Â Â Â Â try:<br>
>Â Â Â Â Â Â Â getter = mod.__dict__["__getattr__"]<br>
<br>
</span>A minor point: this should(?) be written in terms of the public<br>
interface for accessing namespaces, namely:<br>
<br>
       getter = vars(mod)["__getattr__"]<span class="HOEnZb"></span><br clear="all"></blockquote></div><br></div><div class="gmail_extra">Should it? The PEP is not proposing anything for other namespaces. What difference do you envision this way of specifying it would make?</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>
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