Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46644>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to