Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
monomial
1y ago
0 comments
Save
Share
I rarely need to dynamically add attributes myself on dataclasses like this but unfortunately this also means things like `@cached_property` won't work because it can't internally cache the method result anywhere.
0 comments
1 comments · 1 top-level
top
newest
oldest
franga2000
1y ago
IIRC you can just include a __dict__ slot and @cached_property should start working again. I
j
/
k
navigate · click thread line to collapse