| commit | e7bf86cd7d7c9a3924501875a08c4ef4a0063103 | [log] [tgz] |
|---|---|---|
| author | Victor Stinner <victor.stinner@gmail.com> | Fri Oct 09 01:39:28 2015 +0200 |
| committer | Victor Stinner <victor.stinner@gmail.com> | Fri Oct 09 01:39:28 2015 +0200 |
| tree | e0097b0f4fb0194d233d1d9f58bf8570815873c3 | |
| parent | fdfbf781140f22619b0ef6bfeac792496774bb69 [diff] |
Optimize backslashreplace error handler Issue #25318: Optimize backslashreplace and xmlcharrefreplace error handlers in UTF-8 encoder. Optimize also backslashreplace error handler for ASCII and Latin1 encoders. Use the new _PyBytesWriter API to optimize these error handlers for the encoders. It avoids to create an exception and call the slow implementation of the error handler.