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 llllllllll
Recipients Claudiu.Popa, belopolsky, christian.heimes, ethan.furman, ionelmc, jedwards, llllllllll, terry.reedy
Date 2015-04-18.01:28:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"The purpose of callable is to report whether an instance is callable or not"

I am totally with you so far until you get to: "and that information is available on the instance's class, via the presence of __call__". I don't understand why this assumption must be made. The following class is totally valid and callable (in the sense that I can use function call syntax on instances):

class C(object):
    def __call__(self):
        return lambda: None

Also, I don't understand why you would mention __iter__, __iter__ respects the descriptor protocol also:

>>> class C(object):
...     @property
...     def __iter__(self):
...         return lambda: iter(range(10))
>>> it = iter(C())
>>> next(it)
>>> next(it)
>>> next(it)
Date User Action Args
2015-04-18 01:28:50llllllllllsetrecipients: + llllllllll, terry.reedy, belopolsky, christian.heimes, ionelmc, Claudiu.Popa, ethan.furman, jedwards
2015-04-18 01:28:50llllllllllsetmessageid: <>
2015-04-18 01:28:50lllllllllllinkissue23990 messages
2015-04-18 01:28:50llllllllllcreate