. - ( "" ), . (C , ), , . Python, , ; , , . [, , , .]
, - :
obj.deeply.\
nested.\
chain.of.\
attributes
, , , , , , nested , . deeply.
In expressions with a deeper nesting, a small amount of extra spaces can give a large readability coefficient:
For comparison:
x = your_map[my_func(some_big_expr[17])]
vs
x = your_map[ my_func( some_big_expr[17]) ]
Caveats: If your employer, client, team, or professor has style rules or recommendations, you must adhere to them. The second example above does not match the Python style guide, PEP8, which most Python stores accept or adapt. But this document is a compilation of guidelines, not religious or civil decrees.
source
share