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

Constants in Dataclass #1

Open
ClariNerd617 opened this issue Jan 14, 2020 · 0 comments
Open

Constants in Dataclass #1

ClariNerd617 opened this issue Jan 14, 2020 · 0 comments

Comments

@ClariNerd617
Copy link

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant