[issue41276] Min / Max returns different values depending on parameter order
New submission from Calvin Davis : See attached image The behavior of min() (and probably max and other related functions) changes depending on the order of the parameters it sorts. In the image, I sorted two tuples, coordinate points, with the same Y value and different X values. When the X values were in increasing order, finding the minimum x value and minimum y value were the same. However if the list was reversed, finding the minimum x and y values in the list provided different results. -- assignee: terry.reedy components: IDLE files: yqzRk0Y.png messages: 373512 nosy: Calvin Davis, terry.reedy priority: normal severity: normal status: open title: Min / Max returns different values depending on parameter order type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49314/yqzRk0Y.png ___ Python tracker <https://bugs.python.org/issue41276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41276] Min / Max returns different values depending on parameter order
Calvin Davis added the comment: Thank you for the clarification, sorry for the report! You're awesome! -- ___ Python tracker <https://bugs.python.org/issue41276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41276] Min / Max returns different values depending on parameter order
Calvin Davis added the comment: You say that confusing IDLE with Python is common for beginners, do you mean to suggest that IDLE isn't a Python interpreter? I know IDLE is essentially just an IDE and distinctly different than the python shell, but I wasn't aware the differences would affect anything. I expect my sample code would work the same in IDLE or a python file, no confusion there. I guess I'm not sure what you mean by reducing confusion, because to me IDLE and the python shell are similar enough, and both distinctly different than executing a .py file, though both should have the same behavior right? -- ___ Python tracker <https://bugs.python.org/issue41276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com