[Python-ideas] a sorting protocol dunder method?

Ethan Furman ethan at stoneleaf.us
Mon Dec 4 13:16:40 EST 2017


On 12/04/2017 10:01 AM, brent bejot wrote:

> This is certainly a good pattern to use in the current and older versions, but I think we can all agree that defining
> __key__ and calling "sorted(list_of_attrdicts)" has that syntactic sugar that is oh-so-sweet-and-tasty.

Actually, no, we do not all agree.  ;-)

--
~Ethan~


More information about the Python-ideas mailing list