I have a code that looks something like this:
def generate_constraints(c):
if c.name == 'multibodypendulum':
con_fnc = MultiBodyPendulum(**c)
where c is an OmegaConf object containing a bunch of parameters. Now I would like to pass all the parameters in c except the name to the MultiBodyPendulum class (the name was used to identify the class to send the rest of the parameters to). However I have no idea how to make a copy of c without one parameter. Does anyone have a good solution for this?