Skip to content
This repository was archived by the owner on Nov 7, 2020. It is now read-only.
This repository was archived by the owner on Nov 7, 2020. It is now read-only.

Constants in Dataclass #1

Description

@ClariNerd617

The idea of putting the constants in a class is fantastic, but it can be optimized through use of the @dataclass decorator in Python 3.7+.

e.g.

@dataclass
class Constants:
    CONSTANT_1: int
    CONSTANT_2: str
    CONSTANT_3: Any
    # etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions