Formatting practices (was: Passing data to system command)
Cameron Laird
claird at lairds.us
Mon Jun 19 21:20:20 EDT 2006
In article <mailman.7197.1150720173.27775.python-list at python.org>,
Chris Hieronymus <christoph.hieronymus at geo.uu.se> wrote:
.
.
.
> msg = str(x)+" "+str(y)+"\n"
> p1.stdin.write(msg)
.
.
.
While Python prides itself on the clarity of its preferred style,
note that the former line might just as well be written
msg = "%s %s\n" % (x, y)
a form which some of us prefer.
More information about the Python-list
mailing list