Python's simplicity philosophy
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
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
] 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
and look for "decorate-sort-undecorate" as well as subjects
with the word 'sort' in them.
dalke at dalkescientific.com
More information about the Python-list