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 serhiy.storchaka
Recipients AlexWaygood, GBeauregard, Gobot1234, JelleZijlstra, gvanrossum, kj, levkivskyi, serhiy.storchaka, sobolevn
Date 2022-02-06.12:01:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644148872.33.0.641028733615.issue46644@roundup.psfhosted.org>
In-reply-to
Content
There were two reasons of accepting arbitrary callables in _type_check():

1. NewType() returned a function.
2. xml.etree.cElementTree.Element was a function in Python 2.

Now NewType is a class, and Python 2 no longer supported. I agree that we should get rid of the callable() check, but I disagree with the proposed change. The check should be more explicit and strict, not more lenient. List[42] does not make sense and should not be accepted.
History
Date User Action Args
2022-02-06 12:01:12serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, levkivskyi, JelleZijlstra, sobolevn, Gobot1234, kj, AlexWaygood, GBeauregard
2022-02-06 12:01:12serhiy.storchakasetmessageid: <1644148872.33.0.641028733615.issue46644@roundup.psfhosted.org>
2022-02-06 12:01:12serhiy.storchakalinkissue46644 messages
2022-02-06 12:01:12serhiy.storchakacreate