Sum of 2 splits.
(self, other: str | AbstractSplit)
| 657 | raise NotImplementedError |
| 658 | |
| 659 | def __add__(self, other: str | AbstractSplit) -> AbstractSplit: |
| 660 | """Sum of 2 splits.""" |
| 661 | if not isinstance(other, (str, AbstractSplit)): |
| 662 | raise TypeError(f'Adding split {self!r} with non-split value: {other!r}') |
| 663 | if isinstance(other, str): # Normalize strings |
| 664 | other = AbstractSplit.from_spec(other) |
| 665 | return _SplitAdd(self, other) |
| 666 | |
| 667 | |
| 668 | @dataclasses.dataclass(frozen=True) |