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

Function _keep_original_ws

Lib/difflib.py:718–723  ·  view source on GitHub ↗

Replace whitespace with the original whitespace characters in `s`

(s, tag_s)

Source from the content-addressed store, hash-verified

716
717
718def _keep_original_ws(s, tag_s):
719 """Replace whitespace with the original whitespace characters in `s`"""
720 return ''.join(
721 c if tag_c == " " and c.isspace() else tag_c
722 for c, tag_c in zip(s, tag_s)
723 )
724
725
726

Callers 1

_qformatMethod · 0.85

Calls 2

isspaceMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…