[code]
I usually have identation "problems" in ifs, sometimes in for clauses. I usually have not problems in function bodys.
I dislike compacted form because:
- i doubt that is good comply their objetive: reduce line length in body but extend it in control flow lines.
- It's less readable for me. I need to attend to long lines to determine control flow.
- Refactors are complicated. Think in add a initialization block in your example and how many lines are changed to be reviewed by your peers.
- It's syntactic sugar for only some marginal edge cases: it cloying the language
Anyway pep8** says:
Some teams strongly prefer a longer line length. For code maintained
exclusively or primarily by a team that can reach agreement on this
issue, *it is okay to increase the line length limit up to 99 characters*,
provided that comments and docstrings are still wrapped at 72
characters.
So, if 79 chars by line it's too hard for your team you can agree 99 chars lines with your team. Maybe you find problems in:
- web documentation that includes fixed designs for 79 chars (usually you can use other theme)
- errors in linters (can be configured to new line width)
- forcing horizontal scroll in 3ways merges for some team members ¯\_(ツ)_/¯
rarely you find problems by terminal widths (this is a very ancient problem resolved in our century).
So I recomend you relaxed pep8 with 99 chars limit by line in your code instead to pretend change syntax with no clear gains.
regards,
Javi