assert (
long_condition
) else (
long_message
)
Guess it’s else syntax now! I was a bit afraid that bikeshedding would drown other feedback, but if there’s not much other feedback, it’s great. Thanks!
I was a bit afraid to suggest “Black-style” closing parens on their own line. PEP 8 doesn’t explicitly forbid them but doesn’t use them in any examples. I like them, but then I also like to write } else { in C, which is explicitly against PEP 7. Bit it seems Guido’s warmed up to this style. If I make this a PEP, it’ll include this example.
I think the next step, both here and in Pablo’s PEP 679, is to integrate (or reject) the @cben’s idea, which is not as straightforward as it looks.
Unfortunately I don’t have much time to drive this forward. Co-authors welcome. Otherwise I’ll probably wait for Pablo and copy his solution. (I mean no conflict, the pre-PEP is here to explain my reasoning so we can choose the the best idea.)