On Feb 26, 2019, at 13:02, Raymond Hettinger <raymond.hettin...@gmail.com> 
wrote:

> * I gave up on ordering right away.  If we care about performance, keys can 
> be stored in the order added; but no effort should be expended to maintain 
> order if subsequent deletions occur.  Likewise, to keep set-to-set operations 
> efficient (i.e. looping over the smaller input), no order guarantee should be 
> given for those operations.  In general, we can let order happen but should 
> not guarantee it and work to maintain it or slow-down essential operations to 
> make them ordered.

One thing that concerns me would be if the ordering for sets is different than 
dictionaries.  Well, it kind of is already, but it’s easier to say “dict 
preserve insertion order, sets are unordered”, than to say they are both 
ordered but with different guarantees.  The behavior differences between dicts 
and sets is already surprising to many users, so we should be careful not to 
make the situation worse.

-Barry

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to