fix property documentation

Original statement "self._a = a" gave message "a is unrecognized global variable".  It should be "self._a = value".
This commit is contained in:
gitshub 2013-10-02 20:42:46 -04:00
parent 5daa52ee06
commit fe24cad538
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ property, here is a possible implementation in Python::
def _set_a(self, value): def _set_a(self, value):
if value < self.a_min or value > self.a_max: if value < self.a_min or value > self.a_max:
raise ValueError('a out of bounds') raise ValueError('a out of bounds')
self._a = a self._a = value
a = property(_get_a, _set_a) a = property(_get_a, _set_a)
The disadvantage is you have to do that work yourself. And it becomes The disadvantage is you have to do that work yourself. And it becomes