>> By the way, why is it necessary to register?Here's the PEP: http://www.python.org/dev/peps/pep-0293/
>> Since an error handler is defined by its callback function,
>> we could allow functions for the "errors" parameter.
>
> For the same reason we register modules in sys.modules:
> to be able to reference them by name, rather than by object.
>
> Also note that codecs expect to get the error parameter as string
> to keep the API simple and to make short-cuts easy to implement
> in the code (esp. in the C implementations).