Show More
@@ -1277,14 +1277,14 b' class sortdict(collections.OrderedDict):' | |||
|
1277 | 1277 | |
|
1278 | 1278 | >>> d1 = sortdict([(b'a', 0), (b'b', 1)]) |
|
1279 | 1279 | >>> d2 = d1.copy() |
|
1280 | >>> d2 | |
|
1281 |
|
|
|
1280 | >>> list(d2.items()) | |
|
1281 | [('a', 0), ('b', 1)] | |
|
1282 | 1282 | >>> d2.update([(b'a', 2)]) |
|
1283 | 1283 | >>> list(d2.keys()) # should still be in last-set order |
|
1284 | 1284 | ['b', 'a'] |
|
1285 | 1285 | >>> d1.insert(1, b'a.5', 0.5) |
|
1286 | >>> d1 | |
|
1287 |
|
|
|
1286 | >>> list(d1.items()) | |
|
1287 | [('a', 0), ('a.5', 0.5), ('b', 1)] | |
|
1288 | 1288 | """ |
|
1289 | 1289 | |
|
1290 | 1290 | def __setitem__(self, key, value): |
General Comments 0
You need to be logged in to leave comments.
Login now