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.77227e-06
Marked as misclassified No
Message-id <1261684343.23.0.954851699189.issue7006@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
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: <1261684343.23.0.954851699189.issue7006@psf.upfronthosting.co.za>
2009-12-24 19:52:21joe.amentalinkissue7006 messages
2009-12-24 19:52:21joe.amentacreate