Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ohmahjong
· 3y ago · 0 comments
Does that work now? I seem to remember having to use `tags: list[str] = Field(default_factory=list)` a lot
Comments
[–]
kortex
3y ago
Pydantic, yes, you can just set the default initializer to = [] or = {}. I don't think that works with dataclasses yet.