On Tue, Oct 3, 2017 at 2:39 PM, Bill <bill_nos...@whoknows.net> wrote: > Chris Angelico wrote: >> >> Decorators are fairly straight-forward if you understand higher-order >> functions. <snip> >> >> ChrisA > > > > 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. Otherwise, f seems to have "difficulty" calling itself > (I get a typerror, f(n) has value "NoneType"). What is the explanation for > this? Does f have a new name because it has a decorator on it now? > > Note: I am not using functools.wraps since I don't yet understand the reason > I might do that yet (first things first... ).
I would recommend posting your code, possibly in a new thread. ChrisA -- https://mail.python.org/mailman/listinfo/python-list