| 880 | yield '%s %s' % (tag, x[i]) |
| 881 | |
| 882 | def _plain_replace(self, a, alo, ahi, b, blo, bhi): |
| 883 | assert alo < ahi and blo < bhi |
| 884 | # dump the shorter block first -- reduces the burden on short-term |
| 885 | # memory if the blocks are of very different sizes |
| 886 | if bhi - blo < ahi - alo: |
| 887 | first = self._dump('+', b, blo, bhi) |
| 888 | second = self._dump('-', a, alo, ahi) |
| 889 | else: |
| 890 | first = self._dump('-', a, alo, ahi) |
| 891 | second = self._dump('+', b, blo, bhi) |
| 892 | |
| 893 | for g in first, second: |
| 894 | yield from g |
| 895 | |
| 896 | def _fancy_replace(self, a, alo, ahi, b, blo, bhi): |
| 897 | r""" |