What if, instead, there was an `OrderedBag` class that acts like a `list` and 
supports set operations.

The advantage of this is that any hidden indexing that is used to optimize the 
operations could be efficiently created in the object that results from the set 
operation during its construction while performing the operation. Using lists, 
any such indexes would have to be produced and discarded for each operation (or 
could perhaps be kept in weak references or something like that, but that's 
messy).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/T4SNPWTEVCNEQ3A3DYKLMVFP3NRMZR2W/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to