"Dick Moores" <[EMAIL PROTECTED]> wrote >> Hence if type(n) is already long it does not have to get converted >> to int to accommodate something small. > > And that's not a bug?
No its expected behaviour. If you start with a float and add an integer the result is a float. Why should long act any different? >>> n = 4.0 >>> n + 2 6.0 > So the largest int is 2147483647, or 2**31 - 1. > (I know this is all obvious to most, but I still get a kick out of > doing it.) Yep, exactly what sys.maxint tells you. ;-) >>> import sys >>> sys.maxint 2147483647 >>> HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor