API for custom Unicode error handlers
Ethan Furman
ethan at stoneleaf.us
Fri Oct 4 14:05:45 EDT 2013
On 10/04/2013 06:56 AM, Steven D'Aprano wrote:
>
> Should the module holding the error handlers automatically register them?
I think it should.
Registration only needs to happen once, the module is useless without being registered, no threads nor processes are
being started, and the only reason to import the module is to get the functionality... isn't it?
What about help(), sphynx (sp?), or other introspection tools?
This sounds similar to cgitb -- another module which you only import if you want the html'ized traceback, and yet it
requires a separate cgitb.enable() call...
I change my mind, it shouldn't.
Throw in a .enable() function and call it good. :)
--
~Ethan~
More information about the Python-list
mailing list