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 hauntsaninja
Recipients BTaskaya, gvanrossum, hauntsaninja, kj, levkivskyi, serhiy.storchaka
Date 2020-11-16.20:45:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
My implementation in PR 22848 turns callable into a type and uses `__new__`. It isn't too bad. It does appear to affect performance of callable though.

Here's some data on how often typing imports are used. This is the number of files in which `from typing import X` is present in mypy_primer's corpus (searched using the AST). My read of this is that Callable is meaningfully more used than anything else in
'Optional': 2563
'Any': 2402
'List': 2383
'Dict': 2150
'Tuple': 1592
'Union': 1269
'Callable': 1058
'Iterable': 609
'Set': 580
'cast': 505
'Sequence': 465
'Type': 438
'Iterator': 385
'TypeVar': 302
'Mapping': 301
'Generator': 194
'NamedTuple': 138
'Text': 127
'IO': 120
'Awaitable': 116
Date User Action Args
2020-11-16 20:45:35hauntsaninjasetrecipients: + hauntsaninja, gvanrossum, serhiy.storchaka, levkivskyi, BTaskaya, kj
2020-11-16 20:45:35hauntsaninjasetmessageid: <>
2020-11-16 20:45:35hauntsaninjalinkissue42102 messages
2020-11-16 20:45:34hauntsaninjacreate