Message409117
We managed to do this for 'with' so it should be possible here too, I'd think. The "committing" token would be the newline following the close parenthesis.
Serhiy: the benefit is when you want to split it across two lines, e.g.
assert (a_very_long_condition(),
"A Very Long Message")
I know you can do this using backslash, e..
assert a_very_long_condition(), \
"A Very Long Message"
but there's a strong cultural rejection of backslash for line splitting (it's in PEP 8 and engrained in many people's brains) and it's just so natural to use parentheses -- they work for 'import', 'with', function calls, 'if', etc. |
|
Date |
User |
Action |
Args |
2021-12-24 01:01:21 | gvanrossum | set | recipients:
+ gvanrossum, rhettinger, gregory.p.smith, serhiy.storchaka, lys.nikolaou, pablogsal, slebedev |
2021-12-24 01:01:21 | gvanrossum | set | messageid: <1640307681.52.0.90578840299.issue46167@roundup.psfhosted.org> |
2021-12-24 01:01:21 | gvanrossum | link | issue46167 messages |
2021-12-24 01:01:21 | gvanrossum | create | |
|