(self, other)
| 402 | return ast.Name(id=name), {name: other} |
| 403 | |
| 404 | def __convert_to_ast_getitem(self, other): |
| 405 | if isinstance(other, slice): |
| 406 | extra_names = {} |
| 407 | |
| 408 | def conv(obj): |
| 409 | if obj is None: |
| 410 | return None |
| 411 | new_obj, new_extra_names = self.__convert_to_ast(obj) |
| 412 | if new_extra_names is not None: |
| 413 | extra_names.update(new_extra_names) |
| 414 | return new_obj |
| 415 | |
| 416 | return ast.Slice( |
| 417 | lower=conv(other.start), |
| 418 | upper=conv(other.stop), |
| 419 | step=conv(other.step), |
| 420 | ), extra_names |
| 421 | else: |
| 422 | return self.__convert_to_ast(other) |
| 423 | |
| 424 | def __get_ast(self): |
| 425 | node = self.__ast_node__ |
no test coverage detected