diff options
Diffstat (limited to 'Lib/dos-8x3/test_typ.py')
-rwxr-xr-x | Lib/dos-8x3/test_typ.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_typ.py b/Lib/dos-8x3/test_typ.py index 7cca131..6be66ca 100755 --- a/Lib/dos-8x3/test_typ.py +++ b/Lib/dos-8x3/test_typ.py @@ -161,6 +161,11 @@ if a <> [-2,-1,0,1,2]: raise TestFailed, 'list sort' def revcmp(a, b): return cmp(b, a) a.sort(revcmp) if a <> [2,1,0,-1,-2]: raise TestFailed, 'list sort with cmp func' +# The following dumps core in unpatched Python 1.5: +def myComparison(x,y): + return cmp(x%3, y%7) +z = range(12) +z.sort(myComparison) print '6.6 Mappings == Dictionaries' d = {} |