import re def dispatch(selector, uri): for (regex, callable) in selector: match = re.search(regex, uri) if match: callable(**match.groupdict()) break
Keyword parameters.
import re def dispatch(selector, uri): for (regex, callable) in selector: match = re.search(regex, uri) if match: callable(**match.groupdict()) break
Keyword parameters.