do not use too many nested loops and conditions

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

Metadata

ID: python-best-practices/too-many-while

Language: Python

Severity: Warning

Category: Best Practices

Description

A program should have a maximum level of nesting loops. If your program has too many nested loops (if/for/while), consider refactoring your program to avoid too many nesting levels.

Non-Compliant Code Examples

while bla:
    while foo:
        while bar:
            while baz:
                pass

Compliant Code Examples

while bla:
    while foo:
        while bar:
            pass
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis