On Thursday, 2018-07-05 09:38:19 -0700, Dylan Baker wrote:
> Quoting Mathieu Bridon (2018-07-05 06:17:52)
> > In Python 2, the traditional way to sort containers was to use a
> > comparison function (which returned either -1, 0 or 1 when passed two
> > objects) and pass that as the "cmp" argument t
Quoting Mathieu Bridon (2018-07-05 06:17:52)
> In Python 2, the traditional way to sort containers was to use a
> comparison function (which returned either -1, 0 or 1 when passed two
> objects) and pass that as the "cmp" argument to the container's sort()
> method.
>
> Python 2.4 introduced key-f
In Python 2, the traditional way to sort containers was to use a
comparison function (which returned either -1, 0 or 1 when passed two
objects) and pass that as the "cmp" argument to the container's sort()
method.
Python 2.4 introduced key-functions, which instead only operate on a
given item, and