(a, alo, ahi, b, blo, bhi)
| 35 | |
| 36 | |
| 37 | def _plain_replace(a, alo, ahi, b, blo, bhi): |
| 38 | assert alo < ahi and blo < bhi |
| 39 | # dump the shorter block first -- reduces the burden on short-term |
| 40 | # memory if the blocks are of very different sizes |
| 41 | if bhi - blo < ahi - alo: |
| 42 | first = _dump_lines('chg-ins', b, blo, bhi) |
| 43 | second = _dump_lines('chg-del', a, alo, ahi) |
| 44 | else: |
| 45 | first = _dump_lines('chg-del', a, alo, ahi) |
| 46 | second = _dump_lines('chg-ins', b, blo, bhi) |
| 47 | |
| 48 | for g in first, second: |
| 49 | yield from g |
| 50 | |
| 51 | |
| 52 | def _fancy_replace(a, alo, ahi, b, blo, bhi): |
no test coverage detected