functions — and the most-hallucinated bug ai ships8 / 9
closures and the @ symbol — what ai is doing when it stacks decorators
Write a decorator called shout that takes a function returning a
string, calls it, and returns the result with ! removed and converted
to uppercase. (We don't use exclamation marks, but other people's code
does — your decorator strips them.)
Then decorate a function say_hi that returns "hi!" and print
the result.
Expected output:
HI
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _