(path)
| 364 | |
| 365 | if filters: |
| 366 | def getargs(path): |
| 367 | url_args = re_match(path).groupdict() |
| 368 | for name, wildcard_filter in filters: |
| 369 | try: |
| 370 | url_args[name] = wildcard_filter(url_args[name]) |
| 371 | except ValueError: |
| 372 | raise HTTPError(400, 'Path has wrong format.') |
| 373 | return url_args |
| 374 | elif re_pattern.groupindex: |
| 375 | def getargs(path): |
| 376 | return re_match(path).groupdict() |