Skip to content

Improvements to builtins min/max #78

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

Merged
merged 2 commits into from
Feb 4, 2016
Merged

Conversation

rmcgibbo
Copy link
Contributor

@rmcgibbo rmcgibbo commented Feb 3, 2016

Closes #77. I tested it with:

$ cat test.py
from typing import *
x = [1, 2, 3]

max(x)
max(x, key=lambda x:-x)
max(1,2,3, key=lambda x:-x)
max(x, default=1)
max(1,2,3, default=1)

min(x)
min(x, key=lambda x:-x)
min(1,2,3, key=lambda x:-x)
min(x, default=1)
min(1,2,3, default=1)

$ MYPYPATH=stdlib/3/ mypy test.py

@gvanrossum
Copy link
Member

Thanks! The CI test is failing but I think that's not your fault.

gvanrossum added a commit that referenced this pull request Feb 4, 2016
Improvements to builtins min/max
@gvanrossum gvanrossum merged commit ad8019d into python:master Feb 4, 2016
@rmcgibbo rmcgibbo deleted the minmax branch February 18, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants