Closures and the @ symbol — what AI is doing when it stacks decorators — step 7 of 9
AI wrote a decorator that runs the wrapped function but forgets to
return its value. So the decorated function returns None and the
script prints None instead of 5. Add a return to the wrapper so
the script prints 5.
The break is on line 4 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
AI wrote a decorator that runs the wrapped function but forgets to
return its value. So the decorated function returns None and the
script prints None instead of 5. Add a return to the wrapper so
the script prints 5.
The break is on line 4 — but read the whole snippet first.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.