newb question about @property
> Chris Angelico wrote:
>> Decorators are fairly straight-forward if you understand higher-order
>> functions. <snip>
> I was just minding my own business, and thought to write my first
> decorator for a simple *recursive* function f. The decorator WORKS if
> f does not make a call to itself
> (it really wasn't).
Using the (PyCharm) debugger, I determined that my inner function that
was calling my wrapped (Fibonacci sequence) function but wasn't
returning anything to the invoking environment. I fixed it for the sake
of a good, if costly, lesson. Not much of a wrapper, but it "works". A
version which merely prints a tab before the function call, instead of a
row of asterisks produces output which is more interesting to look at.
def inner(*args, **kwargs):
a= func(*args, **kwargs)