[Python-Dev] PEP 318: Properties

Edward Loper edloper at gradient.cis.upenn.edu
Sat Apr 3 21:17:16 EST 2004


> How would this be interpreted?
> 
>     x = 42
> 
>    def x(self) [propget]:
>        "Doc string for x"
>        return self.__x

It should raise an exception here.  See the implementation that I posted 
a few days ago: <http://www.cis.upenn.edu/~edloper/pydecorators.html>. 
The same should apply for the generic decorator, and any other decorator 
that "combines" the new value with the old.

Errors-should-never-pass-silently-yours,

Edward




More information about the Python-Dev mailing list