Python's simplicity philosophy

Andrew Dalke adalke at mindspring.com
Mon Nov 17 09:13:29 CET 2003


Magnus Lie Hetland:
> Surely he was talking about implementing "list-alikes"...?

Yes, I think you're right about that, and I misinterpreted
his statement.

That being the case, an alternative is to have that 'sort'
implements the Python required semantics, and that
'fsort' or somesuch ('f' for 'fast'?) implement the
appropriate data-structure specific one.

Then again, is the change that "all Python list-alikes must
implement stable sort" or that "Python native lists shall
now and forever implement stable sort"?

The official statement from the BDFL is
http://mail.python.org/pipermail/python-dev/2003-October/038773.html
] OK, I pronounce on this: Python's list.sort() shall be stable.

That's a statement only that list.sort shall be stable and
not that all .sort() methods must be stable.

BTW, there was a *HUGH* amount of discussion about
sort and stability and keys and DSU on the python-dev list.
See the archive
http://mail.python.org/pipermail/python-dev/2003-October/thread.html#38772
and look for "decorate-sort-undecorate" as well as subjects
with the word 'sort' in them.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list