diff --git a/pep-0213.txt b/pep-0213.txt index 6cf7b9064..b45f8738f 100644 --- a/pep-0213.txt +++ b/pep-0213.txt @@ -25,7 +25,7 @@ Introduction Justification - Scenario 1: + cenario 1: You have a deployed class that works on an attribute named "stdout". After a while, you think it would be better to @@ -210,6 +210,23 @@ Caveats variable such as __XXX. +Note + + The descriptor mechanism described in PEP 252 is powerful enough + to support this more directly. A 'getset' constructor may be + added to the language making this possible: + + class C: + def get_x(self): + return self.__x + def set_x(self, v): + self.__x = v + x = getset(get_x, set_x) + + Additional syntactic sugar might be added, or a naming convention + could be recognized. + + Local Variables: mode: indented-text