Uh oh!
There was an error while loading. Please reload this page.
Use Literal type in io and _compression - #6917
Conversation
JelleZijlstra
commented
Jan 14, 2022
Just curious, what is your motivation for all these Literal changes? Is there a concrete use case this unlocks? |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
sobolevn
commented
Jan 14, 2022
Yes, I am working on better |
JelleZijlstra
commented
Jan 14, 2022
I saw that but I wasn't clear on the concrete use case there either. |
I can see myself staring at some code that works incorrectly with a chunk of data that is 10000 bytes long but fine with 5000 bytes, wondering what |
sobolevn
commented
Jan 15, 2022
@JelleZijlstra I think that this is how typing should be 🙂 It is just happens right now that we don't use x=1reveal_type(x) # Literal[1]I think that what pyright does at the moment. |
a-reich
commented
Jan 16, 2022
There has been discussion of using literal arithmetic to type array operations (for the shape parameter). |
No description provided.