On Fri, Jun 14, 2013 at 7:35 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
>
> So I still agree with Ezio: the function may be useful as part of the
> stdlib, but it doesn't have to be an encoding error handler.

I don't understand why this functionality should be implemented as anything but an encoding error handler. It can still be implemented in the html package which would either register it itself or export a handler that applications would need to register by calling codecs.register_error().  A more user-friendly solution would be to pre-register a light-weight handler that would not import html.entities and possible most of its own implementation until the first use.