Skip to content

gh-90829: Changing error message in builtins.min/max #91559

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

Closed
wants to merge 2 commits into from
Closed

gh-90829: Changing error message in builtins.min/max #91559

wants to merge 2 commits into from

Conversation

fbrunodr
Copy link

gh-90829: Fixed builtin.min/max error messages when iterable is empty

When passing an empty iterable to min function, such as
min(set()), it returns the error 'arg is an empty sequence'.
'arg' does not match any argument of the function signature.
Also, the iterable argument does not need to be a sequence.
This commit changes it to 'iterable argument is an empty sequence'.

When passing an empty iterable to min function, such as
min(set()), it returns the error 'arg is an empty sequence'.
'arg' does not match any argument of the function signature.
Also, the iterable argument does not need to be a sequence.
This commit changes it to 'iterable argument is an empty sequence'.
@ghost
Copy link

ghost commented Apr 15, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@rhettinger
Copy link
Contributor

Changing it to iterable doesn't read well and makes the message less understandable. Perhaps change it to just say that input is empty (no need to specify a type) or that "at least one data value is required". Alternatively, just leave it as is — this is a really minor and inconsequential nitpick.

@fbrunodr
Copy link
Author

Ok, I think we don't need to fix anything here. Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants