Maries Ionel Cristian added the comment:

For context this respects the descriptor protocol:

>>> a()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in __call__
AttributeError: go away

Mind you, this is legal use:

>>> class B:
...  @property
...  def __call__(self):
...   return lambda: 1
...
>>> b = B()
>>> b()
1

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to