3 ms·
The first problem is a valid problem in Python: it essentially don't have a "char" type, instead it only have strings with size 1. This actually ruined type an
by yegle 7y ago
The first problem is a valid problem in Python: it essentially don't have a "char" type, instead it only have strings with size 1.
This actually ruined type annotation in Python: you can't properly annotate a function to accept anything iterable except string.
https://github.com/python/mypy/issues/4334 https://github.com/python/mypy/issues/4334 is a FR to at least check it with mypy.
- rcfox 7y agoIt's not a perfect solution, but you could perhaps hack it with @overload to say that the "str" version returns NoReturn.