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/2012-January/115423.html below:

[Python-Dev] descriptor as instance attribute

[Python-Dev] descriptor as instance attribute [Python-Dev] descriptor as instance attributeJon Wells jon at sandgate.com
Mon Jan 9 15:32:13 CET 2012
I can't find an answer to this grovelling through get user info. on
descriptors.

Assuming desc() is a data descriptor class why are the following not the
same???

    class poop(object):
        var = desc()

and
        
    class poop(object):
        def __init__(self):
            self.var = desc()

In the second form the descriptor protocol for access to 'var' is
ignored. 

Would seem to not make sense to me.

jon.


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