Decorator to register an implementation for the given types
(*types)
| 377 | return lists |
| 378 | |
| 379 | def register(*types): |
| 380 | """ |
| 381 | Decorator to register an implementation for the given types |
| 382 | """ |
| 383 | check(types) |
| 384 | |
| 385 | def dec(f): |
| 386 | check(getfullargspec(f).args, operator.lt, ' in ' + f.__name__) |
| 387 | typemap[types] = f |
| 388 | return f |
| 389 | |
| 390 | return dec |
| 391 | |
| 392 | def dispatch_info(*types): |
| 393 | """ |