Re: [Python-3000] A new member for contextlib? 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

_______________________________________________
Python-3000 mailing list
smsbmo-9552@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: http://mail.python.org/mailman/options/python-3000/python-3000%40tangomu.com


