(signature, args_part)
| 8 | |
| 9 | |
| 10 | def bind_args(signature, args_part): |
| 11 | pos_args = [] |
| 12 | kw_args = {} |
| 13 | for k, arg in args_part.items(): |
| 14 | if isinstance(k, int): |
| 15 | pos_args.append(arg) |
| 16 | else: |
| 17 | kw_args[k] = arg |
| 18 | |
| 19 | bound_args = signature.bind(*pos_args, **kw_args) |
| 20 | return IndexedDict(bound_args.arguments) |
| 21 | |
| 22 | |
| 23 | def get_mapped_name(name, mappings): |