1. 学习
  2. /
  3. 课程
  4. /
  5. Writing Functions in Python

Connected

练习

Using decorator syntax

You have written a decorator called print_args that prints out all of the arguments and their values any time a function that it is decorating gets called.

说明 1 / 共 2 个

undefined XP
  • 1

    Decorate my_function() with the print_args() decorator by redefining the my_function variable.

  • 2

    Decorate my_function() with the print_args() decorator using decorator syntax.