[issue46644] typing: remove callable() check from typing._type_check

Jelle Zijlstra report at bugs.python.org
Sat Feb 5 12:43:27 EST 2022


Jelle Zijlstra <jelle.zijlstra at gmail.com> added the comment:

I agree with removing this check. I suspect it's a holdover from very early typing when static types were supposed to be runtime types. Now the check is a bug magnet and doesn't serve a useful purpose.

I think we can just remove the tests that check for ints. I don't see a principled reason to special-case int literals.

I wonder if we should apply this change to 3.10 and 3.9. It's arguably a bugfix, but it's a pretty big change.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46644>
_______________________________________


More information about the Python-bugs-list mailing list