-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
For min/max functions a default value changes the key function type #6460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe should this be closed here and opened in typeshed instead? @srittau. Agreed on using the same representation for types; can you file that separately? Or send in a PR if you can. |
Well, changing
Say, I find my regex-ninja in me, the diff of the PR would be 💣. |
Original issue was fixed in python/typeshed#2833. |
I think a 8 lines diff still counts as contribution to python core. 🙌 |
Related but maybe not the same #3354
Given
mypy complains about the
item[0]
usage in the key function:Also interesting that it shows two different representations for the inferred type.
For user ergonomics the revealed type should be 'Optional[Tuple[int, str]]' as well, no?
The text was updated successfully, but these errors were encountered: