[Patches] [ python-Patches-693753 ] fix for bug 639806: default for dict.pop

SourceForge.net noreply@sourceforge.net
Wed, 26 Feb 2003 08:51:07 -0800


Patches item #693753, was opened at 2003-02-26 16:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=693753&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Stone (mbrierst)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for bug 639806: default for dict.pop

Initial Comment:
This patch adds an optional default value to dict.pop,
so that it parallels dict.get, see discussion in bug
639806.

If no default is given, the old behavior still exists,
so backwards compatibility is no problem.
The new pop must use METH_VARARGS
and PyArg_UnpackTuple, somewhat effecting
efficiency.

If this is considered desirable, I could also
provide the same behavior for list.pop.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=693753&group_id=5470