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