Hrvoje Niksic wrote: > The same oddity occurs with expressions in kwargs calls: > > func(pos1, pos2, keyword=foo + bar) > > I find myself wanting to add parentheses arround the + to make the code > clearer. Then why don't you? In the above example, spaces around the + are not only optional but discouraged, this would be preferred: func(pos1, pos2, keyword=foo+bar) but if you insist on using spaces (perhaps because it is part of a larger expression) just use parentheses. func(pos1, pos2, keyword=(foo*spam*ham*eggs + bar/spam**cheese)) Strictly speaking they're not needed, but if they make it easier to read (and I think they do) then why would you not use them? -- Steven
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