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


Groups > comp.lang.python > #55488

Re: API for custom Unicode error handlers

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:error': 0.03; 'handler': 0.05; 'importing': 0.05; 'implements': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subtle': 0.09; 'type,': 0.09; 'works.': 0.09; 'bugs.': 0.16; 'c.py': 0.16; 'fails.': 0.16; 'imports': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:API': 0.16; 'subject:Unicode': 0.16; 'module': 0.19; 'import': 0.22; 'header :User-Agent:1': 0.23; 'error': 0.23; 'module,': 0.24; 'equivalent': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; "doesn't": 0.30; 'that.': 0.31; 'quite': 0.32; "i'd": 0.34; "can't": 0.35; 'but': 0.35; 'there': 0.35; 'leads': 0.36; 'module.': 0.36; 'right?': 0.36; 'should': 0.36; '8bit%:86': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:46': 0.66; 'difference.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: API for custom Unicode error handlers
Date Fri, 04 Oct 2013 22:08:50 +0300
References <524ec8fe$0$29984$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmp5JSqwOoE-zC40u7HS28i9O43FSS+-hprqvHCpiK1iOQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 46.211.122.30
User-Agent Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0
In-Reply-To <CAPTjJmp5JSqwOoE-zC40u7HS28i9O43FSS+-hprqvHCpiK1iOQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.729.1380913714.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380913714 news.xs4all.nl 15941 [2001:888:2000:d::a6]:44303
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55488

Show key headers only | View raw


04.10.13 20:22, Chris Angelico написав(ла):
> I'd be quite happy with importing having a side-effect here. If you
> import a module that implements a numeric type, it should immediately
> register itself with the Numeric ABC, right? This is IMO equivalent to
> that.

There is a difference. You can't use a numeric type without importing a 
module, but you can use error handler registered outside of your module.

This leads to subtle bugs. Let the A module imports error_handlers and 
uses error handle. The module B uses error handle but doesn't import 
error_handlers. C.py imports A and B and all works. D.py imports B and A 
and fails.

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