Skip to content

Explain why Python import statements need to be within the function body #207

@tylere

Description

@tylere

The Fused Docs Function Declaration section states:

Declare import statements within the function body,

without additional information on why this should be done. Given this directive is contrary to the default Python style for imports, additional explanation is needed.

PEP8 guidance for imports:

Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions