[Tutor] a question about maxint

Peter Otten __peter__ at web.de
Tue Oct 2 19:17:52 CEST 2012

Katya Stolpovskaya wrote:

> I have this error:
>>>> from sys import *
>>>> maxint
> Traceback (most recent call last):
> File "<pyshell#4>", line 1, in <module>
> maxint
> NameError: name 'maxint' is not defined
> What does it mean and how to deal with it?

You are probably using Python 3 which doesn't have sys.maxint. 

How to deal with that depends on you want to do with the value -- so what 
are you trying to do?

(For most applications sys.maxsize which exists in Python 2 and 3 should 
work just as well)

More information about the Tutor mailing list