MCPcopy Index your code
hub / github.com/RustPython/RustPython / _keep_original_ws

Function _keep_original_ws

Lib/difflib.py:715–720  ·  view source on GitHub ↗

Replace whitespace with the original whitespace characters in `s`

(s, tag_s)

Source from the content-addressed store, hash-verified

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

Callers 1

_qformatMethod · 0.85

Calls 2

joinMethod · 0.45
isspaceMethod · 0.45

Tested by

no test coverage detected