Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
monomial
10mo ago
0 comments
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.
undefined | Better HN
0 comments
default
newest
oldest
franga2000
10mo 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