Ordered dict by default

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Feb 6 18:26:57 EST 2009

> In Python 3 strings are all unicode, integral numbers are all
> multiprecision, chars in Python 2.x+ are strings, lists are arrays
> that can grow dynamically, and so on because the Purpose of Python
> isn't to be as fast as possible, but to be first of all flexible,
> safe, easy, not but-prone, even if other solution or older versions
> were faster.

I have missed another example: It may be possible to create a sorting
routine that's not stable but is faster than the current stable
timsort (for example in C++ STL you have both sorting routines, and
the unstable one is a variant of introsort that is faster than the
stable version). I think Python will keep the stable one, because even
if (in theory. In practice it may be quite difficult to write such
unstable sorter faster than timsort) it can be slower, it's safer and
more useful than an unstable sort.


More information about the Python-list mailing list