Last active
November 18, 2022 17:06
-
-
Save petrosDemetrakopoulos/a89ff7c350259f8811f1da2874ca84f5 to your computer and use it in GitHub Desktop.
A dataclass with default values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
@dataclass | |
class User: | |
email: str | |
name: str = "First name" | |
surname: str = "Last name" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment