pylint #50461 Support new @property as in Python 2.6 [validation pending]
It would be helpful if the following would be understood by pylint without issuing warnings: 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 | |
priority | normal |
---|---|
type | enhancement |
done in | 0.25.1 |
load left | 0.000 |
closed by | #869685f9a22d Do not issue warnings when using 2.6's property.setter/deleter functionality. Closes #50461, #52020 and #51222. |
Comments
-
2012/01/12 09:20, written by anon
-
2012/01/19 16:39, written by sthenault
add commentclass C(object):
def __init__(self):
self._x = None
@property
def x(self):
"""I'm the 'x' property."""
return self._x
@x.setter
@dummyDecorator
def x(self, value):
self._x = value
@x.deleter
@anotherDummyDecorator
def x(self):
del self._x
If you use a decorator ( Like @dummyDecorator or @anotherDummyDecorator ) between the function name and the properties decorator, the warnings are reissued.
please file a ticket for this pb