summaryrefslogtreecommitdiff
path: root/Python/dynload_os2.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-06-26 20:08:32 +0000
committerBarry Warsaw <barry@python.org>2001-06-26 20:08:32 +0000
commit66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01 (patch)
treed558727415d5663d76dec08adce6ecebdbbd7534 /Python/dynload_os2.c
parent0dcf67e56d891832b53a82ee0abb60dcc2e0148e (diff)
downloadcpython-git-66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01.tar.gz
dict_update(): Generalize this method so {}.update() accepts any
"mapping" object, specifically one that supports PyMapping_Keys() and PyObject_GetItem(). This allows you to say e.g. {}.update(UserDict()) We keep the special case for concrete dict objects, although that seems moderately questionable. OTOH, the code exists and works, so why change that? .update()'s docstring already claims that D.update(E) implies calling E.keys() so it's appropriate not to transform AttributeErrors in PyMapping_Keys() to TypeErrors. Patch eyeballed by Tim.
Diffstat (limited to 'Python/dynload_os2.c')
0 files changed, 0 insertions, 0 deletions