popkey() method for dictionaries?
Raymond Hettinger
vze4rx4y at verizon.net
Mon Nov 18 02:55:56 EST 2002
> [ 639806 ] Optional argument for dict.pop() method
>
> at:
>
https://sourceforge.net/tracker/index.php?func=detail&aid=639806&group_id=54
70&atid=105470
>
> Sorry but I just saw that my proof-of-concept code in python got squashed
by
> SF. I didn't know that SF removed all leading whitespace, hence destroying
> indentation. Here it is again for reference:
Do you have use cases demonstrating the value of a default rather than an
exception?
Also, discuss why similarity with dict.get() applies instead of symmetry
with list.pop() or dict.popitem().
Raymond Hettinger
More information about the Python-list
mailing list