mirror of https://github.com/kivy/kivy.git
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:
parent
5daa52ee06
commit
fe24cad538
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue