summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/mbcs.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-06-26 20:08:32 (GMT)
committerBarry Warsaw <barry@python.org>2001-06-26 20:08:32 (GMT)
commit66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01 (patch)
treed558727415d5663d76dec08adce6ecebdbbd7534 /Lib/encodings/mbcs.py
parent0dcf67e56d891832b53a82ee0abb60dcc2e0148e (diff)
downloadcpython-66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01.zip
cpython-66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01.tar.gz
cpython-66a0d1d9b9f7d7e3bd7edce79bf862fc4cdd7b01.tar.bz2
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 'Lib/encodings/mbcs.py')
0 files changed, 0 insertions, 0 deletions