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/2003-May/035791.html below:

[Python-Dev] Descriptor API

[Python-Dev] Descriptor API [Python-Dev] Descriptor APIPhillip J. Eby pje@telecommunity.com
Wed, 21 May 2003 07:52:53 -0400
At 01:41 AM 5/21/03 +0100, Gonçalo Rodrigues wrote:

>So, why doesn't getting __set__  raise AttributeError in the above case?

Because property() is a type.  And that type has __get__ and __set__ methods.


>Is this a bug?

No.


>If it's not, it sure is a (minor) feature request from my
>part :-)

To do this would require there to be two types, and 'property()' be a 
function that selected which of the two types to instantiate.

Why do you care whether the attribute is read-only?  Are you writing a 
documentation tool?




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