[Python-3000] set literals

Terry Reedy tjreedy at udel.edu
Mon Jul 10 22:28:17 CEST 2006


"Guido van Rossum" <guido at python.org> wrote in message 
news:ca471dc20607101026j4c3d7de4h1c587e13ae7510cd at mail.gmail.com...
>> > Unfortunately we couldn't redefine <=, <, >=, > to mean various
>> > subset/superset tests without backwards incompatibilities (but does
>> > anyone care?
>>
>> You mean those are defined *now*? I'm trying to figure out what the heck 
>> they
>> could even mean. . .
>
> They're intended to provide stable though arbitrary ordering for
> dicts. Admittedly not very useful (and a pain to implement!). In py3k
> we won't require everybody to support <= etc.; while so far I've been
> saying this about different types, it makes sense that even within one
> type one might not want to define them.

If you don't let complex numbers be ordered, even lexicographically, then I 
see even less need to arbitrarily order dicts.  If anyone really does use 
the current feature, and really needs it, an ordict with the old behavior 
for <, etc, could be added to collections.

I like the idea of at least partially unifying the set and dict interfaces.

Terry Jan Reedy





More information about the Python-3000 mailing list