Skip to content

Make ParameterizedFunction copy parameter references #960

Open

Description

@Dsolnik

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/

Activity

  1. Dsolnik commented on Aug 14, 2024

    @Dsolnik
    Author
  2. philippjfr commented on Apr 30, 2026

    @philippjfr
    Member

    Sorry you never got a reply here or on your PR. In general I think this breaks the contract of an instance. Using refs like this would link one instance to all other instances, which seems unexpected. Adding a flag may be okay. Wouldn't blame you if you've forgotten or no longer care but can you describe the motivating use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions