This may be an OS problem since I did saw on youtube videos where people were demoing how to use decorators in python in a Linux based system.
So I'm trying to play with decorators. In its usual form, you create a function of it first, and then you use the special keywoard "@func_name" in order to pass the next line of arguments into the function. This particular method of utilizing decorator is not working. I've tried in PyDev (Eclipse) and it is just reading as syntax error. I also tried the interactive Python.
Currently running windows OS 7 Python Version 2.78
Here are more specific examples
def c(n):
def d():
return "Hello world",n
return d()
c=c("of Python")
print c
output: ('Hello world', 'of Python')
@c
"of Python"
output: "of Python?"
^
SyntaxError: invalid syntax
Created a working version based on Jon's answer
def c(n):
def d():
return "Hello world" + n()
return d
@c
def decorate_this_func():
return " python"
print decorate_this_func()