Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
monomial
8 months ago
|
parent
|
context
|
favorite
| on:
Loading Pydantic models from JSON without running ...
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.
franga2000
8 months ago
[–]
IIRC you can just include a __dict__ slot and @cached_property should start working again. I
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: