"print int" would be nice

Grant Edwards grante at visi.com
Tue Jan 29 18:10:08 EST 2002


In article <838zag25t7.fsf at panacea.canonical.org>, Kragen Sitaker wrote:
> grante at visi.com (Grant Edwards) writes:
>> In article <834rl5gmkw.fsf at panacea.canonical.org>, Kragen Sitaker wrote:
>> >> Is there a reason why python doesn't convert a int to string 
>> >> automatically? Would be nice this would work:
>> >> 
>> >> i=2
>> >> print "int: " + i
>> > 
>> > Python generally does not convert types automatically.  
>> 
>> It does for many numeric types.
> 
> Which ones?

http://www.python.org/doc/current/ref/conversions.html

-- 
Grant Edwards                   grante             Yow!  Yow! Is my fallout
                                  at               shelter termite proof?
                               visi.com            



More information about the Python-list mailing list