Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #55487

Re: API for custom Unicode error handlers

Date 2013-10-04 11:05 -0700
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: API for custom Unicode error handlers
References <524ec8fe$0$29984$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.728.1380911272.18130.python-list@python.org> (permalink)

Show all headers | View raw


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~

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

API for custom Unicode error handlers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-04 13:56 +0000
  Re: API for custom Unicode error handlers Chris Angelico <rosuav@gmail.com> - 2013-10-05 03:22 +1000
  Re: API for custom Unicode error handlers Ethan Furman <ethan@stoneleaf.us> - 2013-10-04 11:05 -0700
  Re: API for custom Unicode error handlers Serhiy Storchaka <storchaka@gmail.com> - 2013-10-04 22:08 +0300
  Re: API for custom Unicode error handlers Serhiy Storchaka <storchaka@gmail.com> - 2013-10-04 22:35 +0300
  Re: API for custom Unicode error handlers Terry Reedy <tjreedy@udel.edu> - 2013-10-04 18:44 -0400

csiph-web