#835 Properties incorrectly treated as methods

1.4.2
open
5
2009-01-16
2009-01-16
No

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

Discussion