Closed sebastian-goeldi closed 5 months ago
@joamatab is this what you roughly wanted?
not really, this seems overly complicated
i prefer functions over classes, as they are easier to read and to write
You have to choose, either make it inheritable as a class or use no decorator.
With this you now have three choices:
my_kcell.dup()
(needs name change to avoid collision, i.e. doesn't change the cached KCell)kf.cells.straight.straight._kcell(...)
to get the uncached version directly and wrap that in a @cell
decorator to cache (this will not set all settings though, only the ones passed to the new function with @cell
)I can't give you something to inject a post_process into an existing function. At that point, just unlock the cell and modify it, it's the same as if you were grabbing kwargs from the footprint of the function.
then, l prefer keeping the cell decorator as it is and then passing an explicit post_process
function
Move the code creating the
KCell
from__call__
for_kcell
.This will allow to make inheritance.
E.g.