Closed benbovy closed 6 years ago
Monkey patching _CountingAttr
is probably better, after all (but still a hack). It adds the compute
decorator for all attr.ib
and not just for on_demand variables, but we could just ignore it when we don't need it.
A workaround before (hopefully) a cleaner solution (see https://github.com/python-attrs/attrs/issues/340).
Re-use argument list from
attr.attrib
for_CountingAttr.__init__()
. It should at least reduce the risk of breaking the code when new arguments are introduced.