[Python-ideas] Exploiting type-homogeneity in list.sort() (again!)

Chris Angelico rosuav at gmail.com
Mon Mar 6 01:40:16 EST 2017


On Mon, Mar 6, 2017 at 5:31 PM, Tim Peters <tim.peters at gmail.com> wrote:
> Not a solution.  Not even close ;-)  Even if it made good sense,
> there's nothing to stop a custom __lt__ method from creating new
> threads _during_ a sort.

Arbitrary comparison functions let you do anything.... but whoa, I
cannot imagine any way that this would ever happen outside of "hey
look, here's how you can trigger a SystemError"!

ChrisA


More information about the Python-ideas mailing list