In article <[email protected]>, rusi <[email protected]> wrote:
> On Jun 19, 8:39 pm, Roy Smith <[email protected]> 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
