HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by dorfsmay | Hacker News Reader
Full thread
dorfsmay
·
How do you define class variable in a data class?
View on HN
ericvsmith
·
typing.ClassVar. See
https://docs.python.org/3/library/dataclasses.html#class-var...
nerdwaller
·
You can use `typing.ClassVar[<datatype>]`
Reply on news.ycombinator.com