diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-29 04:07:15 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-29 04:07:15 (GMT) |
commit | 51b4ade30615dccaa7f591456528821f4320d5ff (patch) | |
tree | 523a2ab5f3c3154c3e175b6adec26eefdf23cfae /Lib/TERMIOS.py | |
parent | 014f103705afef0c1c6d7dc740e6a4f21b2da794 (diff) | |
download | cpython-51b4ade30615dccaa7f591456528821f4320d5ff.zip cpython-51b4ade30615dccaa7f591456528821f4320d5ff.tar.gz cpython-51b4ade30615dccaa7f591456528821f4320d5ff.tar.bz2 |
Fix obscure breakage (relative to 2.3) in listsort: the test for list
mutation during list.sort() used to rely on that listobject.c always
NULL'ed ob_item when ob_size fell to 0. That's no longer true, so the
test for list mutation during a sort is no longer reliable. Changed the
test to rely instead on that listobject.c now never NULLs-out ob_item
after (if ever) ob_item gets a non-NULL value. This new assumption is
also documented now, as a required invariant in listobject.h.
The new assumption allowed some real simplification to some of the
hairier code in listsort(), so is a Good Thing on that count.
Diffstat (limited to 'Lib/TERMIOS.py')
0 files changed, 0 insertions, 0 deletions