English subtitles

← 03-36 Decorated Decorators

dummy description

Get Embed Code
1 Language

Showing Revision 1 created 04/29/2012 by Amara Bot.

  1. Okay, now for a quick quiz.
  2. We have this definition of decorator, and we've seen how that works.
  3. Here's an alternative that was proposed by Darius Bacon,
  4. which is this1 line--return the function that updates wrapper for the decorator
  5. applied to the function from the original function,
  6. and then 1 more line, which says, decorator = decorator of decorator.
  7. Can you get any more recursive than that?
  8. The question is, does this work?
  9. I want you to give me the best answer.
  10. The possible answers are yes, it does; no, it's an error; no, it correctly updates decorator
  11. such as n_ary, but not the decorated function such as (seq);
  12. or no, my brain hurts.