[issue39308] Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter.

2020-01-11 Thread Tomasz Trębski
Tomasz Trębski added the comment: Also happens in `3.8`, so right when `Literal` got moved to core `Python`. -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue39

[issue39308] Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter.

2020-01-11 Thread Tomasz Trębski
Change by Tomasz Trębski : -- title: Literal[True] interpreted as Literal[1] -> Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter. ___ Python tracker <https://bugs.python.org/issu

[issue39308] Literal[True] interpreted as Literal[1]

2020-01-11 Thread Tomasz Trębski
New submission from Tomasz Trębski : Consider code (in attachment) that is being run on Python 3.9. An expected output of such code ought to be: (typing_extensions.Literal[1], typing_extensions.Literal[0]) (typing_extensions.Literal[True], typing_extensions.Literal[False]) However that'