PEP 308: A PEP Writer's Experience - PRO
Andrew Koenig
ark at research.att.com
Sat Feb 8 13:42:31 EST 2003
Tim> OTOH, when I read Micahel's post, I had no idea whether
Tim> print "x = " + x.getDisplayString() if x else "None"
Tim> would group as:
Tim> print ("x = " + (x.getDisplayString() if x else "None"))
Tim> or as:
Tim> print (("x = " + x.getDisplayString()) if x else "None")
Tim> and I didn't even know which way he *intended*. Spelled with an if-
Tim> statement instead, the intent is obvious instead of a puzzle.
Or spelled with an extra pair of parentheses.
--
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list