This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joe.amenta
Recipients Trundle, benjamin.peterson, exarkun, ezio.melotti, georg.brandl, joe.amenta, milko.krachounov, ncoghlan, pitrou
Date 2009-12-24.19:52:20
SpamBayes Score 1.7722689e-06
Marked as misclassified No
Message-id <>
One such weird corner case:

from collections import Callable
class Spam(object):
   def __call__(self):
      return self

can_of_spam = Spam()
print callable(can_of_spam) == isinstance(can_of_spam, Callable) # True
del Spam.__call__
can_of_spam.__call__ = lambda can: 'spam'
print callable(can_of_spam) == isinstance(can_of_spam, Callable) # False

Regardless, attached a patch for the new proposed semantics
Date User Action Args
2009-12-24 19:52:23joe.amentasetrecipients: + joe.amenta, georg.brandl, exarkun, ncoghlan, pitrou, benjamin.peterson, ezio.melotti, Trundle, milko.krachounov
2009-12-24 19:52:23joe.amentasetmessageid: <>
2009-12-24 19:52:21joe.amentalinkissue7006 messages
2009-12-24 19:52:21joe.amentacreate