On Dienstag 02 November 2010, Sylvain Thénault wrote: > hum, pylint doesn't handle any of those forms. It currently > grasp: > > @property > def nameid(self): > ... > > and > > def nameid(self): > ... > nameid = property(nameid) > > which are more 'usual' form of properties usage, imo.
but they pollute namespace with many unneeded local methods, if you also define setters/deleters the new possibilities in 2.6 are certainly usual, I hope. At least they are official. From http://docs.python.org/library/functions.html: 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 I guess I have to stay with @apply for now -- Wolfgang
_______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
