param icon indicating copy to clipboard operation
param copied to clipboard

Make ParameterizedFunction copy parameter references

Open Dsolnik opened this issue 1 year ago • 1 comments

In the constructor for a ParameterizedFunction, all of the values at the current point in time are copied. Unfortunately, this doesn't copy over references.

Is your feature request related to a problem? Please describe.

It's frustrating that I need to add back in all the different previous parameters back.

Describe the solution you'd like

I'd like to copy over references, or add a flag to copy them.

Describe alternatives you've considered

def instance(fn, **kwargs):
    params = fn.param.objects()
    params.update(**kwargs)
    return obj.instance(**params)

Maybe we could make an option to the instance method/

Dsolnik avatar Aug 14 '24 06:08 Dsolnik

https://github.com/holoviz/param/pull/961

Dsolnik avatar Aug 14 '24 06:08 Dsolnik