On Sat, Aug 16, 2014 at 12:25 AM, Ben Finney <ben+python at benfinney.id.au> wrote: > Steven D'Aprano <steve at pearwood.info> writes: > >> If people were going to be prone to mistake >> >> with (a, b, c): ... >> >> as including a tuple > > … because the parens are a strong signal “this is an expression to be > evaluated, resulting in a single value to use in the statement”. > >> they would have already mistaken: >> >> with a, b, c: ... >> >> the same way. But they haven't. > > Right. The presence or absence of parens make a big semantic difference. At least historically so, since "except a, b:" and "except (a, b):" used to be different things (only the latter constructs a tuple in 2.x). OTOH, consider "from .. import (..., ..., ...)". Pretty sure at this point parens can be used for non-expressions quite reasonably -- although I'd still prefer just allowing newlines without requiring extra syntax. -- Devin
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