STINNER Victor <vstin...@redhat.com> added the comment:

Getting an error handler is expensive compared to the time to encode 
text/decode bytes. Python loads the error handler lazily to provide best 
performances. Text codecs are performance critical for Python.

If we add a check, it should only be enabled in development (python3 -X dev) 
and/or debug mode (./configure --with-pydebug).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37388>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to