A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-January/097191.html below:

[Python-Dev] Data descriptor doc/implementation inconsistency

[Python-Dev] Data descriptor doc/implementation inconsistency [Python-Dev] Data descriptor doc/implementation inconsistencyBenjamin Peterson benjamin at python.org
Mon Jan 11 02:00:32 CET 2010
2010/1/10 Amaury Forgeot d'Arc <amauryfa at gmail.com>:
> Quoting the documentation:
> """Normally, data descriptors define both __get__() and __set__(),
> while non-data descriptors have just the __get__() method.
> """
> Your example is neither a data descriptor nor a non-data descriptor...

See the footnote: http://docs.python.org/reference/datamodel#id7

>
> The thing that worries me a bit is the "x.attr" returning the Descr
> object. Descriptors should remain at the class level, and instance
> should only see values. I'd prefer an AttributeError in this case.

Far too late for that, I'm afraid.



-- 
Regards,
Benjamin

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