44tq
last updated 2 years ago by effbot #
I agree that the decorators should be moved to a later place, and I also think the example could be simplified (an adding function is a bit too abstract for me); how about a "debugging decorator" instead, which simply prints the arguments and return values for a decorated function?

A "debugging decorator" is definitely more useful. I've always had pretty good success explaining decorators to people with adding functions, which is why I used it as the example.
Baseline 2 years ago #