If sets were ordered, then what ought pop() return - first, last, or nevertheless an arbitrary element? I lean toward arbitrary because in existing code, set.pop often implies that which particular element is immaterial.

On Wed, Feb 27, 2019 at 2:18 PM Barry Warsaw <barry@python.org> wrote:
On Feb 27, 2019, at 13:54, Chris Barker via Python-Dev <python-dev@python.org> wrote:
> A mapping and a set type really don't have much to do with each other other than implementation -- anyone that isn't familiar with python C code, or hash tables in general, wouldn't likely have any expectation of them having anything to do with each other.

I’m just relaying a data point.  Some Python folks I’ve worked with do make the connection between dicts and sets, and have questions about the ordering guarantees of then (and how they relate).


Python-Dev mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-dev/tahafut%40gmail.com