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 Noah May
Recipients Noah May
Date 2020-04-16.07:27:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587022037.69.0.998051306567.issue40298@roundup.psfhosted.org>
In-reply-to
Content
Whether this is considered a bug or not is subjective. The question is should callable(Tuple) return True or False? Or should it for any other annotation object?

The reason it returns true in the first place is because of a warning to explicitly NOT call them as functions/constructors:

>>> from typing import Tuple
>>> callable(Tuple)
True
>>> Tuple()
TypeError: Type Tuple cannot be instantiated; use tuple() instead

Source code: https://github.com/python/cpython/blob/master/Lib/typing.py#L724:L733

I honestly don't know how this could be "fixed" if it even needs to be fixed. But I just wanted to bring attention to it.

Cheers.
History
Date User Action Args
2020-04-16 07:27:17Noah Maysetrecipients: + Noah May
2020-04-16 07:27:17Noah Maysetmessageid: <1587022037.69.0.998051306567.issue40298@roundup.psfhosted.org>
2020-04-16 07:27:17Noah Maylinkissue40298 messages
2020-04-16 07:27:17Noah Maycreate