In article <e724fc3e-8198-4fb7-b1d3-96834f3fa...@34g2000pru.googlegroups.com>, rusi <rustompm...@gmail.com> wrote:
> On Jun 19, 8:39 pm, Roy Smith <r...@panix.com> wrote: > > > This is one of the (very) few places PHP wins over Python. In PHP, I > > would write this as > > > > print "'$x'" > > > You dont find > > >>> print '"%s"' % x > > readable? Why? I didn't say it wasn't readable, I said other things were easier to read. There's something nice about building up strings in-line, as opposed to having to look somewhere to see what's being interpolated. To give a more complex example, consider: print "$scheme://$host:$port/$route#$fragment" That certainly seems easier to me to read than: print "%s://%s:%s/%s#%s" % (scheme, port, host, route, fragment) because I don't have to line up the nth format specifier with the nth data item.
-- http://mail.python.org/mailman/listinfo/python-list