Loading lesson…
Level 1 · Apprentice0 XP
Keyword arguments, *args and **kwargs, and the decorators that AI frameworks use everywhere.
Step 1 / 6
ProblemAn agent framework example puts @tool above a function and suddenly the model can call it. A retry library adds @retry. It looks like magic.
← → step
Before this: Python syntax in one sitting
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Write a @retry(times=3, delay=1.0) decorator by hand (three layers), keep the wrapped function's name with functools.wraps, and test it with a function that fails twice then succeeds.