0

I have a requirement to include * in arguments to a function. But it's syntactically wrong like below

>>> xr.bngConfig(get_topo*titan_file=self.inputs['titan_file'])
File "<stdin>", line 1
SyntaxError: keyword can't be an expression

I cannot change the argument here since bngConfig is calling a tcl function which has -get_topo*titan_file as argument which I can't change.

How can * be included in python call?

1 Answer 1

2

The hard way.

xr.bngConfig(**{'get_topo*titan_file': self.inputs['titan_file']})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.