Kaydet (Commit) d73ef06c authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Exercise sorted() where possible

üst b86269db
...@@ -23,9 +23,7 @@ for data, dict in cases: ...@@ -23,9 +23,7 @@ for data, dict in cases:
C = Cookie.SimpleCookie() ; C.load(data) C = Cookie.SimpleCookie() ; C.load(data)
print repr(C) print repr(C)
print str(C) print str(C)
items = dict.items() for k, v in sorted(dict.iteritems()):
items.sort()
for k, v in items:
print ' ', k, repr( C[k].value ), repr(v) print ' ', k, repr( C[k].value ), repr(v)
verify(C[k].value == v) verify(C[k].value == v)
print C[k] print C[k]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment