[Python-Dev] PEP 293, Codec Error Handling Callbacks
Martin v. Loewis
12 Aug 2002 23:41:38 +0200
"M.-A. Lemburg" <firstname.lastname@example.org> writes:
> The problem is the same as what we had with the exceptions.py
> module early on in the 1.6 alphas: if this module isn't found
> all kinds of things start failing. The same would happen when
> you start to use builtin codecs which have external error handler
> implementation as .py files, e.g. unicode('utf-8', 'replace')
> could then fail because of an ImportError.
What kinds of things would start failing? If you get an interactive
prompt (i.e. Python still manages to start up), or you get a traceback
indicating the problem in non-interactive mode, I don't see this as a
problem - *of course* Python will stop working if you remove essential
This is like saying you expect the interpreter to continue to work
after you remove python23.dll.
So, if your worry is that things would not work if you remove a Python
file - don't worry. Python already relies on Python files being
present in various places.
> For the charmap codec it's mostly about performance. I don't
> have objections for other codecs which rely on external
Please remember that we are still about error handling here, and that
the normal case will be "strict", which usually results in aborting
So I don't see the performance issue even for the charmap codec.