for -- else: what was the motivation?

Axy axy at declassed.art
Sun Oct 9 12:53:55 EDT 2022


> Since many languages allow placing multiple statements on one line or
> spreading one over many lines, it seems that the number of lines in code
> can be adjusted.
>
> If I have a line like:
>
>   Alpha, beta, gamma, delta = 1, 2, 3, 4
>
> Could that be rewritten as 4 or more lines?

Surely! Especially if you're paid for SLOC :-)))

By the way, does "else" clause after affect cyclomatic complexity 
metric? I mean "for" loops.

Axy.



More information about the Python-list mailing list