[New-bugs-announce] [issue41276] Min / Max returns different values depending on parameter order

Calvin Davis report at bugs.python.org
Sat Jul 11 00:02:02 EDT 2020


New submission from Calvin Davis <mynameiscalvindavis at gmail.com>:

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 <report at bugs.python.org>
<https://bugs.python.org/issue41276>
_______________________________________


More information about the New-bugs-announce mailing list