Skip to content

Use explicit lazy import in pprint #149091

@jonathandung

Description

@jonathandung

Feature or enhancement

Proposal:

Currently, the pprint module imports dataclasses for its is_dataclass function within the _format method of the PrettyPrinter class here. This can be refactored into a module-level lazy import.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions