Brad Bollenbach wrote: > Shouldn't Python be smart enough to know that even without ()'s around > the > whole thing, this is all one line (therefore avoiding the current > odd/unexpected IMHO behaviour with the format string)? After all, I'm > telling it this much by using the line continuation character "\" > aren't I? It has no trouble telling that it's all one line. Its problem is you are not following operator precedence. You'd get the same error if it were all on one line: print "%s " + "%s" % ("hello", "world") The problem is that % has higher precedence than +, so it interprets this as print "%s " + ("%s" % ("hello", "world")) which isn't what you meant. -- Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/ __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE / \ Forgiveness is another word for letting go. \__/ Matthew Fox Interstelen / http://www.interstelen.com/ A multiplayer, strategic, turn-based Web game on an interstellar scale.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4