Passing through keywork arguments

J

jwsacksteder

If I have a class method that accepts keywork arguments, how may I pass
those arguments into a method call of some other class? This is some
namespace thing I'm not understanding and I can't seem to find any examples.
 
S

Simon Dahlbacka

If I have a class method that accepts keywork arguments, how may I pass
those arguments into a method call of some other class? This is some
namespace thing I'm not understanding and I can't seem to find any
examples.

def function_accepting_kwargs(**kw):
# optionally check/mangle kw here (it is a dictionary)
otherfunction(**kw)

/Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,189
Messages
2,571,016
Members
47,618
Latest member
Leemorton01

Latest Threads

Top