4 ms·
> I see this cited every time. Unfortunately, it's bogus in practice. Consider: > > print('some long thing', > further, arguments) > > If this is an
by u801e 9y ago
> I see this cited every time. Unfortunately, it's bogus in practice. Consider:
>
> print('some long thing',
> further, arguments)
>
> If this is an indented block, you'd have to indent the second line to the correct depth with tabs, then add exactly six spaces for alignment. You have to mix spaces and tabs, which is never good news.
One way to avoid this would be use a hanging indent. For example:
print(
'some long thing', further,
arguments)
That would work well with either tabs or spaces.
- Sammi 9y agoThis is the right way to do it always, because it is the consistent way. You'll always be indenting the same way everywhere if you do it like this.