Ask coding questions

← Back to all posts
Python decorators
isaiah08 (63)

Why is Functions.function not taking the func parameter? I have no clue, if someone could explain, that would be great. Thanks!

Comments
hotnewtop
RYANTADIPARTHI (6001)

you aren't calling the func parameter in your other function. That;s causing the error

isaiah08 (63)

It's still not working... @RYANTADIPARTHI

RYANTADIPARTHI (6001)

@isaiah08 try returning instead of printing.

SixBeeps (5057)

Uhh, you never gave it a value for func?

isaiah08 (63)

I thought i did, because of the function name. @SixBeeps

SixBeeps (5057)

@isaiah08 I don't think it works that way.
Also, you gave it the string "ouput" instead of the function output(). In theory you should just pass in the function name to pass it in as an argument.