pass **kwargs argument to another function with **kwargs

后端 未结 5 1884
青春惊慌失措
青春惊慌失措 2020-11-30 19:06

I do not understand the following example, lets say I have these functions:

# python likes
def save(filename, data, **kwargs):
    fo = openX(filename, \"w\"         


        
5条回答
  •  甜味超标
    2020-11-30 19:23

    Because a dictionary is a single value. You need to use keyword expansion if you want to pass it as a group of keyword arguments.

提交回复
热议问题