I want to break this code:
ex = func(object) if not self.is_object() else foo()
to multiple lines (pep 8). What is the best way to do it? I thought about this:
ex = func(object) \
if not self.is_object() \
else foo()
But this seems a bit ugly and not very neat. Is there another way?
Edit: This is different from just breaking a line into multiple lines, because this is a special "expression if stmnt else stmnt" and not just breaking any python code.