Skip to content

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

Closed
fbrunodr wants to merge 2 commits intopython:mainfrom
fbrunodr:min-max-error-message-fix
Closed

gh-90829: Changing error message in builtins.min/max#91559
fbrunodr wants to merge 2 commits intopython:mainfrom
fbrunodr:min-max-error-message-fix

Conversation

@fbrunodr
Copy link
Copy Markdown

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
Copy Markdown

ghost commented Apr 15, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@rhettinger
Copy link
Copy Markdown
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
Copy Markdown
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