fork download
  1. def fun01(my_args):
  2. for name,value in enumerate(my_args):
  3. print('{0} is an {1}'.format(name, value))
  4.  
  5.  
  6. def fun02(*my_args):
  7. for name,value in enumerate(my_args):
  8. print('{0} is an {1}'.format(name, value))
  9.  
  10.  
  11. def fun03(**my_args):
  12. for name,value in enumerate(my_args):
  13. print('{0} is an {1}'.format(name, value))
  14.  
  15.  
  16. #fun01(caption='acme', length=523, units='mm') # a
  17. fun02(caption='acme', length=523, units='mm') # b
  18. #fun03(caption='acme', length=523, units='mm') # c
Runtime error #stdin #stdout #stderr 0.01s 23352KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 17, in <module>
TypeError: fun02() got an unexpected keyword argument 'caption'