special rules in typeshed pyi · Issue #270 · python/typeshed (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Let's use this issue to track special stub rules that found their way into typeshed stubs. Since mypy is currently the only system used for testing typeshed, it's natural for some mypy logic to become reflected in the typeshed stubs.
So far I have:
- When something is declared as taking unicode (in the PY2 stubs) then it actually also takes str/bytes.
- When something is declared as taking only float, it also takes int. (EDIT: This is mentioned in PEP 484. See https://www.python.org/dev/peps/pep-0484/#the-numeric-tower)
(I'll add these to README.md
once we have a complete list.)