[Python-ideas] Add "htmlcharrefreplace" error handler
Alexander Belopolsky
alexander.belopolsky at gmail.com
Fri Jun 14 15:20:33 CEST 2013
On Fri, Jun 14, 2013 at 8:39 AM, Amaury Forgeot d'Arc <amauryfa at gmail.com>
wrote:
> By the way, why is it necessary to register?
> Since an error handler is defined by its callback function,
> we could allow functions for the "errors" parameter.
+1
In fact, it is not necessary to register the codecs either. We could allow
any namespace that defines CodecInfo attributes or a getregentry function.
The users would them be able to write
from encodings import ascii
x.encode(ascii)
instead of x.encode("ascii"). The benefit is that most IDEs would provide
auto-completion and as you type error checking and the resulting program
will not have a hidden import masquerading as a builtin call.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130614/06210b1f/attachment-0001.html>
More information about the Python-ideas
mailing list