[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

Nick Coghlan report at bugs.python.org
Fri Dec 25 08:13:50 CET 2009


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Just confirming that 2.x also correctly ignores instance attributes (as
it should, since it looks at the tp_call slot):

>>> odd = Spam()
>>> odd.__call__ = lambda: 'very odd'
>>> callable(odd)
False

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7006>
_______________________________________


More information about the Python-bugs-list mailing list