You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the input! The style of breaking ternaries before the else is intentional, as opposed to after the else in your preferred style. Had the else clause been a bit longer the second else would also get split into its own line.
(p.s. I did end up starting a discussion on match expressions on the discuss forum, feel free to add your thoughts there, maybe we'll see something come out of it!)
Just a data point, I was surprised by how black treated my code: reformatting some chained ternaries decreases their readability.
To Reproduce
is reformatted as:
which no longer has the structure that was present in to first.
(If only we had match expressions in Python.)
The text was updated successfully, but these errors were encountered: