How to combine dataclass, property, and lru_cache
How to combine dataclass, property, and lru_cache Question: I’m trying to combine dataclasses, properties and lru_caches for some computational science code: from dataclasses import dataclass from typing import Any from functools import lru_cache @dataclass class F: a: Any = 1 b: Any = 2 c: Any = 3 @property @lru_cache(1) def d(self): print(‘Computing d’) return …