MCPcopy Index your code
hub / github.com/python/cpython / _plain_replace

Method _plain_replace

Lib/difflib.py:882–894  ·  view source on GitHub ↗
(self, a, alo, ahi, b, blo, bhi)

Source from the content-addressed store, hash-verified

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"""

Callers 1

_fancy_helperMethod · 0.95

Calls 1

_dumpMethod · 0.95

Tested by

no test coverage detected