diff options
author | Guido van Rossum <guido@python.org> | 2007-02-15 04:01:01 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-15 04:01:01 (GMT) |
commit | 75d26ccd7af6f10054dbd74f9c42171f1fa298d6 (patch) | |
tree | ed1a343de77a67300b33bdab866747d7eff3ad0c | |
parent | d81206d1526f869645bca83193da5ddfefaf4936 (diff) | |
download | cpython-75d26ccd7af6f10054dbd74f9c42171f1fa298d6.zip cpython-75d26ccd7af6f10054dbd74f9c42171f1fa298d6.tar.gz cpython-75d26ccd7af6f10054dbd74f9c42171f1fa298d6.tar.bz2 |
Some more test now pass.
-rw-r--r-- | BROKEN | 3 | ||||
-rw-r--r-- | Lib/UserDict.py | 2 | ||||
-rw-r--r-- | Lib/test/test_richcmp.py | 2 |
3 files changed, 3 insertions, 4 deletions
@@ -1,4 +1,3 @@ test_bsddb test_bsddb3 test_compile test_dumbdbm test_importhooks test_iter test_iterlen test_minidom test_mutants - test_os test_pickletools test_plistlib test_richcmp test_shelve - test_unittest test_userdict + test_os test_plistlib diff --git a/Lib/UserDict.py b/Lib/UserDict.py index 7570cef..91508d8 100644 --- a/Lib/UserDict.py +++ b/Lib/UserDict.py @@ -117,7 +117,7 @@ class DictMixin: def items(self): return list(self.iteritems()) def clear(self): - for key in self.keys(): + for key in list(self.iterkeys()): del self[key] def setdefault(self, key, default=None): try: diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py index 72a6de8..99ddc30 100644 --- a/Lib/test/test_richcmp.py +++ b/Lib/test/test_richcmp.py @@ -265,7 +265,7 @@ class DictTest(unittest.TestCase): imag1a = {} for i in range(50): imag1a[random.randrange(100)*1j] = random.randrange(100)*1j - items = imag1a.items() + items = list(imag1a.items()) random.shuffle(items) imag1b = {} for k, v in items: |