pylint #4593 pylint complains when initializing attribute via property() [open]
Suppose I have a new-style class which uses a property() call to define a setter: class C(object): def __init__(self): self.a = 5 def set_a(self, val): self._a = val def get_a(self): return self._a a = property(get_a, set_a) pylint complains that self._a is initialized outside of __init__. It would be nice if it could figure out that C.set_a is a valid place to initialize self._a. (I realize this may well not be a trivial request.) | |
priority | minor |
---|---|
type | bug |
done in | <not specified> |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |
similar entities