2010/1/10 Amaury Forgeot d'Arc <amaur...@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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to