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

Method mutating

Lib/test/test_codeccallbacks.py:1151–1156  ·  view source on GitHub ↗
(exc)

Source from the content-addressed store, hash-verified

1149 data.decode(encoding, "test.replacing")
1150
1151 def mutating(exc):
1152 if isinstance(exc, UnicodeDecodeError):
1153 exc.object = b""
1154 return ("\u4242", 0)
1155 else:
1156 raise TypeError("don't know how to handle %r" % exc)
1157 codecs.register_error("test.mutating", mutating)
1158 # If the decoder doesn't pick up the modified input the following
1159 # will lead to an endless loop

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected