[Python-ideas] "Exposing" `__min__` and `__max__`

Richard Damon Richard at Damon-Family.org
Tue Jun 26 20:30:11 EDT 2018

On 6/26/18 11:34 AM, Franklin? Lee wrote:
> It is not possible to handle `key` without figuring out if a function
> is monotonic (a Turing-complete problem in general) or anti-monotonic
> (if that is a real term), so you MUST fall back on full iteration if a
> key is provided.
Monotonic (in this sense) just means never changing directions, it can
be increasing and never decreasing or decreasing and never increasing so
we don't need the 'anti-' version.

Richard Damon

More information about the Python-ideas mailing list