Kaydet (Commit) 7f9b5e01 authored tarafından Guido van Rossum's avatar Guido van Rossum

OK, changed my mind once more on this. The comparison hierarchy is

now

    None < all numeric types < all other types

so that once again

    map(max, Squares(3), Squares(2))

equals

    [0, 1, 4]
üst 0871e931
......@@ -483,7 +483,7 @@ if map(int, Squares(10)) != [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]:
raise TestFailed, 'map(int, Squares(10))'
if map(None, Squares(3), Squares(2)) != [(0,0), (1,1), (4,None)]:
raise TestFailed, 'map(None, Squares(3), Squares(2))'
if map(max, Squares(3), Squares(2)) != [0, 1, None]:
if map(max, Squares(3), Squares(2)) != [0, 1, 4]:
raise TestFailed, 'map(max, Squares(3), Squares(2))'
print 'max'
......
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