]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Improve DictMixin.
authorRaymond Hettinger <python@rcn.com>
Mon, 18 Nov 2002 04:34:10 +0000 (04:34 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 18 Nov 2002 04:34:10 +0000 (04:34 +0000)
commit8ddc176e2e7ef11b2c46062b29563bc776f177b8
tree9420f4a710a3ae47f72c846c0b6f5e0c1a9a29bd
parent782d9408667f8df924d865088839633f53cf89bc
Improve DictMixin.
Replaced docstring with comments.  Prevents subclass contamination.
Added the missing __cmp__() method and a test for __cmp__().
Used try/except style in preference to has_key() followed by a look-up.
Used iteritem() where possible to save creating a long key list and
   to save redundant lookups.
Expanded .update() to look for the most helpful methods first and gradually
   work down to a mininum expected interface.
Expanded documentation to be more clear on how to use the class.
Doc/lib/libuserdict.tex
Lib/UserDict.py
Lib/test/test_userdict.py