As a starting developer in Python I\'ve seen this error message many times appearing in my console but I don\'t fully understand what does it means.
Could anyone tel
I came across this error message through a silly mistake. A classic example of Python giving you plenty of room to make a fool of yourself. Observe:
class DOH(object):
def __init__(self, property=None):
self.property=property
def property():
return property
x = DOH(1)
print(x.property())
Results
$ python3 t.py
Traceback (most recent call last):
File "t.py", line 9, in
print(x.property())
TypeError: 'int' object is not callable
The problem here of course is that the function is overwritten with a property.