2
0
mirror of https://github.com/boostorg/python.git synced 2026-02-02 21:12:15 +00:00

fix list sorting in py3k

[SVN r54675]
This commit is contained in:
Haoyu Bai
2009-07-05 16:48:15 +00:00
parent ec4a1df1e0
commit c4c7fe6dc0
2 changed files with 3 additions and 2 deletions

View File

@@ -109,6 +109,7 @@ void exercise(list x, object y, object print)
print("sorted:");
x.pop(2); // make sorting predictable
x.pop(2); // remove [1,2] so the list is sortable in py3k
x.sort();
print(x);

View File

@@ -97,9 +97,9 @@ removing 666
reversing...
['y', 'x', X(3), [1, 2], '.', 'o', 'l', 'l', 'e', 'h']
sorted:
[[1, 2], '.', 'e', 'h', 'l', 'l', 'o', 'x', 'y']
['.', 'e', 'h', 'l', 'l', 'o', 'x', 'y']
reverse sorted:
['y', 'x', 'o', 'l', 'l', 'h', 'e', '.', [1, 2]]
['y', 'x', 'o', 'l', 'l', 'h', 'e', '.']
'''
def run(args = None):