"print int" would be nice
Kragen Sitaker
kragen at pobox.com
Tue Jan 29 16:41:40 EST 2002
More information about the Python-list mailing list
Tue Jan 29 16:41:40 EST 2002
- Previous message (by thread): "print int" would be nice
- Next message (by thread): "print int" would be nice
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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? >>> [][1.] Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: sequence index must be integer
- Previous message (by thread): "print int" would be nice
- Next message (by thread): "print int" would be nice
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list