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/2010-November/105769.html below:

[Python-Dev] [Python-checkins] r86566 - in python/branches/py3k: Doc/glossary.rst Doc/library/inspect.rst Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS Misc/python-wing4.wpr

[Python-Dev] [Python-checkins] r86566 - in python/branches/py3k: Doc/glossary.rst Doc/library/inspect.rst Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS Misc/python-wing4.wprMichael Foord fuzzyman at voidspace.org.uk
Sat Nov 20 17:28:40 CET 2010
On 20/11/2010 16:06, Michael Foord wrote:
> On 20/11/2010 16:01, Nick Coghlan wrote:
> [snip...]
>> The retrieval of __class__ is a
>> normal lookup on the object, so it can trigger all of the things
>> getattr_static is trying to avoid (unavoidable if you want to support
>> proxy classes at all), and the lookup of __mro__ invokes all of those
>> things on the metaclass.
>
> __class__ and mro lookup are noted in the docs as being exceptions. We 
> could actually remove the __class__ lookup from the list of exceptions 
> by using type(...) instead of obj.__class__.
>

Done.

>> I'll see if I'm still of the same opinion after I sleep on it, but my
>> first impression of the docs was that they slightly oversold the
>> strength of the "doesn't execute arbitrary code" aspect of the new
>> function. The existing caveats were all relating to when getattr() and
>> getattr_static() might give different answers, while the additional
>> caveats I was suggesting related to cases where arbitrary code may
>> still be executed.
> I'm happy to change the wording to make the promise less strong.

I've also removed the __mro__ exception. This is done with:

     type.__dict__['__mro__'].__get__(klass)

If you can think of any other exceptions then please let me know.

Michael

> All the best,
>
> Michael
>
>> Cheers,
>> Nick.
>>
>
>


-- 

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

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