An utility to introspect the dispatch algorithm
(*types)
| 390 | return dec |
| 391 | |
| 392 | def dispatch_info(*types): |
| 393 | """ |
| 394 | An utility to introspect the dispatch algorithm |
| 395 | """ |
| 396 | check(types) |
| 397 | lst = [] |
| 398 | for anc in itertools.product(*ancestors(*types)): |
| 399 | lst.append(tuple(a.__name__ for a in anc)) |
| 400 | return lst |
| 401 | |
| 402 | def _dispatch(dispatch_args, *args, **kw): |
| 403 | types = tuple(type(arg) for arg in dispatch_args) |