You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""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."""
347
+
defmy_function(a, b, c):
348
+
print(a+b+c)
349
+
350
+
# Decorate my_function() with the print_args() decorator by replacing my_fuction variable
351
+
my_function=print_args(my_function)
352
+
353
+
my_function(1, 2, 3)
354
+
355
+
# my_function was called with a=1, b=2, c=3
356
+
# 6
357
+
358
+
## Using decorator syntax 2
359
+
360
+
# Decorate my_function() with the print_args() decorator above
0 commit comments