To improve code readability I need to split my ternary operator expression into multiple lines. My only idea is something like this:
very_long_function_name(
...
very_long_expression_if_the_condition_is_true
if the_condition
else another_expression_if_the_condition_is_false)
Unfortunately PyCharm claims that continuation line over-indented for visual indent
is a violation of PEP8. When I wrap the operator in braces PyCharm raises no objections, but IMHO the code is less readable then.
Is there any [semi]formal recommendation for splitting ternary operator into multiple lines?
Declaration of auxiliary functions/methods is not an option.