(self, other)
| 440 | raise exceptions.ASTNodeRewrite(f"Can't add String and `{type(other)}`") |
| 441 | |
| 442 | def __mul__(self, other): |
| 443 | if isinstance(other, int): |
| 444 | return String(value=self.value * other) |
| 445 | else: |
| 446 | raise exceptions.ASTNodeRewrite( |
| 447 | f"Can't multiply String and `{type(other)}`" |
| 448 | ) |
| 449 | |
| 450 | def __str__(self): |
| 451 | return str(self.value) |