can list keyword arguments duty receives?
i have dict, i need pass key/values keyword arguments.. example..
d_args = {'kw1': 'value1', 'kw2': 'value2'}
example(**d_args)
this works fine, but there values d_args dict supposed example function, apparently dies.. say, instance duty tangible def example(kw2):
this problem given i don't control presumably date d_args, example function.. both outmost modules, example wholly accepts keyword-arguments dict..
ideally i only do
parsed_kwargs = feedparser.parse(the_url)
valid_kwargs = get_valid_kwargs(parsed_kwargs, valid_for = pyrss2gen.rss2)
pyrss2gen.rss2(**valid_kwargs)
i substantially only filter dict, list current keyword-arguments, nonetheless i wondering: is there proceed programatically list keyword arguments a specific duty takes?
Comments
Post a Comment