mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534)
This commit is contained in:
parent
c53b310e59
commit
6bf3237379
5 changed files with 68 additions and 25 deletions
|
@ -3054,12 +3054,13 @@ dict.pop
|
|||
|
||||
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
||||
|
||||
If key is not found, default is returned if given, otherwise KeyError is raised
|
||||
If the key is not found, return the default if given; otherwise,
|
||||
raise a KeyError.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value)
|
||||
/*[clinic end generated code: output=3abb47b89f24c21c input=eeebec7812190348]*/
|
||||
/*[clinic end generated code: output=3abb47b89f24c21c input=e221baa01044c44c]*/
|
||||
{
|
||||
return _PyDict_Pop((PyObject*)self, key, default_value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue