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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user