This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Disambiguate "min() or max()" exception string
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: ddorfman, loewis
Priority: normal Keywords: patch

Created on 2004-08-08 11:34 by ddorfman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
minmax.diff ddorfman, 2004-08-08 11:34 Diff against bltinmodule.c
Messages (2)
msg46585 - (view) Author: Dima Dorfman (ddorfman) Date: 2004-08-08 11:34
The min and max builtins are implemented by the same C 
function, and one of the exception strings is:

   ValueError: min() or max() arg is an empty sequence

which is unsurprisingly unhelpful for a statement that calls both of 
them on different sequences. The function knows which operation 
it's implementing it, so why not display the right one?
msg46586 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-12 14:43
Logged In: YES 
user_id=21627

Thanks for the patch. Applied as bltinmodule.c 2.317.
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40717
2004-08-08 11:34:32ddorfmancreate