On 3/21/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Terry Reedy schrieb: > > "Georg Brandl" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > | Yes, but dictionaries had an explicit ordering in dict_compare() which > > was > > | deleted. > > > > Is dict_compare something added in 2.5? It is neither a builtin or dict > > method in 2.4. > > No, it is a C function in dictobject.c, in Python available as dict.__cmp__. > > > In any case, this point is that dict ordering is as arbitrary as ordering, > > for instance, a dict and a string. Since Guido stopped the experiment of > > totally ordering all objects when complex nums were added, consistency > > suggests that all fake orderings be eliminated, leaving only the order of > > numbers, characters, and sequences of comparable objects. > > It was not really *that* arbitrary. There was a defined algorithm, and it > made some sense (at least for 1-item-dicts).
It was well-defined because I had to do *something* that depended only on the keys and values and not on object identities etc. I never considered it *userful* and I don't know of anyone who used it. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com