"print int" would be nice
Kragen Sitaker
kragen at pobox.com
Tue Jan 29 16:41:40 EST 2002
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
More information about the Python-list
mailing list