[Python-3000] A new member for contextlib?
Christian Heimes
lists at cheimes.de
Fri Apr 4 15:39:25 CEST 2008
Zaur Shibzoukhov schrieb:
> I suggest a context manager for property defining/redefining. There is a
> prototype and illustrative example:
Python 2.6 and 3.0 already have a new way to modify properties:
class C(object):
@property
def x(self): return self._x
@x.setter
def x(self, value): self._x = value
@x.deleter
def x(self): del self._x
Christian
More information about the Python-3000
mailing list