[Tutor] a question about maxint
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Oct 2 19:31:25 CEST 2012
On 02/10/2012 17:55, Katya Stolpovskaya wrote:
> Hi all,
>
> 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?
>
> Thank you in advance,
>
> Katya
>
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
It means exactly what it says. Your version of Python doesn't have
maxint defined in the built-in sys module. I'd hazard a guess that
you're using a Python 3 version in which case you have maxsize defined
instead of maxint.
As a slight aside, using the import that way is usually considered bad
style.
--
Cheers.
Mark Lawrence.
More information about the Tutor
mailing list