[Python-ideas] String interpolation again.
Alex Light
scialexlight at gmail.com
Fri Jul 23 14:35:40 CEST 2010
On Fri, Jul 23, 2010 at 8:26 AM, Andrey Popp <8mayday at gmail.com> wrote:
> I think it's a form of weak typing from languages like PHP, that
> allows programmer to make huge amounts of mistakes, that are sometimes
> difficult to spot.
I agree. but i wouldn't mind if python would start automatically calling str
on objects in string sequences if they are not strings.
i.e. turn this
not_a_string = 123
a_string = 'this is a string' + not_a_string
#currently throws syntax error
to this:
a_string = 'this is a string ' + str(not_a_string)
they do this in java and it works quite well
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100723/87692027/attachment.html>
More information about the Python-ideas
mailing list