On Thu, Feb 28, 2019 at 7:23 AM Henry Chen <[email protected]> wrote:

> 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.
>
>
dict.popitem() pops last inserted pair.  So set.pop() must remove last
element.

https://docs.python.org/3/library/stdtypes.html#dict.popitem

-- 
INADA Naoki  <[email protected]>
_______________________________________________
Python-Dev mailing list
[email protected]
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