On Tue, Jun 15, 2021 at 5:41 AM BlindAnagram <blindanag...@nowhere.org> wrote:
> However, d.pop(key, [default]) returns the value (or the default) and
> consistency with other pops (a good thing in my view) would suggest that
> d.pop() could return a random value, which would serve my purpose when
> there is only one element.
>

Is this actually important or are you just looking for a meaningless
"inconsistency"? Dictionaries are fundamentally different from lists.
Is it really that hard to use popitem?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to