Given a higher order function that takes multiple functions as arguments, how could that function pass key word arguments to the function arguments?
example
def eat(food='eggs', how_much=1):
print(food * how_much)
def parrot_is(state='dead'):
print("This parrot is %s." % state)
def skit(*lines, **kwargs):
for line in lines:
line(**kwargs)
skit(eat, parrot_is) # eggs \n This parrot is dead.
skit(eat, parrot_is, food='spam', how_much=50, state='an ex-parrot') # error
state
is not a keyword arg of eat
so how can skit only pass keyword args relevant the function that it is calling?