From d73ef06cd30eea20f121a79984b8c0c762cb4373 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 4 Jan 2004 11:14:51 +0000 Subject: Exercise sorted() where possible --- Lib/test/test_cookie.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/test/test_cookie.py b/Lib/test/test_cookie.py index 65b0645..3e80b6f 100644 --- a/Lib/test/test_cookie.py +++ b/Lib/test/test_cookie.py @@ -23,9 +23,7 @@ for data, dict in cases: C = Cookie.SimpleCookie() ; C.load(data) print repr(C) print str(C) - items = dict.items() - items.sort() - for k, v in items: + for k, v in sorted(dict.iteritems()): print ' ', k, repr( C[k].value ), repr(v) verify(C[k].value == v) print C[k] -- cgit v0.12