Formatting practices (was: Passing data to system command)

Cameron Laird claird at lairds.us
Tue Jun 20 03:20:20 CEST 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