Properties incorrectly treated as methods
Brought to you by:
fabioz
In this:
class C(object):
def foo(self):
return 1
foo = property(foo)
print C().fo
hitting Ctrl-Space makes PyDev suggest foo() as a completion. It should be foo without the parantheses, because the instance method has been converted into a read-only instance property.
The same goes for the less explicit (but equivalent) form:
class C(object):
@property
def foo(self):
return 1