COMMANDS and the decorator command(name) that registers the function under name and returns it unmodified (registration decorators don't wrap). Then dispatch(name, *args) looks up and calls the command, raising KeyError naturally for unknown names.@command('greet') on hello; dispatch('greet', 'Ana')hello('Ana')'s resultThe decorator filed the function; dispatch found it.
Registration happens at import time.
return func — no wrapper layer.