[docs] documentation bug

Georg Brandl georg at python.org
Sat Jan 28 20:03:21 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 26.01.2012 15:28, schrieb Andreas Balogh:
> 
> Classification: Public
> 
> Hello,
> 
> in http://docs.python.org/library/functions.html#property
> 
> class C(object): def __init__(self): self._x = None
> 
> @property def x(self): """I'm the 'x' property.""" return self._x
> 
> @x.setter def x(self, value): self._x = value
> 
> @x.deleter def x(self): del self._x
> 
> should read correctly
> 
> class C(object): def __init__(self): self._x = None
> 
> *   @x.getter* def x(self): """I'm the 'x' property.""" return self._x
> 
> @x.setter def x(self, value): self._x = value
> 
> @x.deleter def x(self): del self._x
> 
> Regards, Andreas

Hi Andreas,

have you tried your suggestion?  For me, it raises a NameError.

cheers,
Georg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iEYEARECAAYFAk8kRnkACgkQN9GcIYhpnLDibgCfeW8nPj3KONmkuF9R7Q5v/IPZ
GBoAoKLRc1q8vwcRdv109gza68kfhwll
=FIYB
-----END PGP SIGNATURE-----


More information about the docs mailing list