Issue
I've been trying to find out how to represent a maximum integer, and I've read to use "sys.maxint"
. However, in Python 3 when I call it I get:
AttributeError: module 'object' has no attribute 'maxint'
Solution
The sys.maxint constant was removed, since there is no longer a limit to the value of integers. However, sys.maxsize can be used as an integer larger than any practical list or string index. It conforms to the implementation’s “natural” integer size and is typically the same as sys.maxint in previous releases on the same platform (assuming the same build options).
http://docs.python.org/3.1/whatsnew/3.0.html#integers
Answered By - Diego Basch
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.