Commit e3ef5141 authored by Tim Peters's avatar Tim Peters

A blurb about the sort implementation.

parent 5d0fb600
...@@ -6,6 +6,18 @@ Type/class unification and new-style classes ...@@ -6,6 +6,18 @@ Type/class unification and new-style classes
Core and builtins Core and builtins
- list.sort() has a new implementation. While cross-platform results
may vary, and in data-dependent ways, this is much faster on many
kinds of partially ordered lists than the previous implementation,
and reported to be just as fast on randomly ordered lists on
several major platforms. This sort is also stable (if A==B and A
precedes B in the list at the start, A precedes B after the sort too),
although the language definition does not guarantee stability. A
potential drawback is that list.sort() may require temp space of
len(list)*2 bytes (*4 on a 64-bit machine). It's therefore possible
for list.sort() to raise MemoryError now, even if a comparison function
does not. See <http://www.python.org/sf/587076> for full details.
- All standard iterators now ensure that, once StopIteration has been - All standard iterators now ensure that, once StopIteration has been
raised, all future calls to next() on the same iterator will also raised, all future calls to next() on the same iterator will also
raise StopIteration. There used to be various counterexamples to raise StopIteration. There used to be various counterexamples to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment