[Python-Dev] Compact ordered set
INADA Naoki
songofacandy at gmail.com
Thu Feb 28 04:38:21 EST 2019
On Thu, Feb 28, 2019 at 7:23 AM Henry Chen <tahafut at gmail.com> 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 <songofacandy at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190228/9d67afe6/attachment.html>
More information about the Python-Dev
mailing list