I have a next code
global_variable = 1
@property
def method():
# Some magic, for example
# incrementing global variable
global global_variable
global_variable += 1
return global_variable
print method
This code return
<property object at 0x28dedb8>
But I expect 2. Is it possible in python to use property decorator outside a class?