Commit fa3fc1d8 authored by Stefan Behnel's avatar Stefan Behnel

test 'unsigned long' against maxint+1 to avoid dependency on real long size

parent e0c899e3
......@@ -3,12 +3,17 @@ __doc__ = """
0L
>>> test(1)
1L
>>> 2**36
68719476736L
>>> test(2**36)
0L
>>> test(2L**36)
0L
>>> import sys
>>> sys.maxint + 1 > sys.maxint
True
>>> type(sys.maxint * 2 + 1) is long
True
>>> test(sys.maxint + 1)
2147483648L
>>> test(sys.maxint * 2 + 1)
4294967295L
"""
def test(k):
......
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