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
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to