Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88837
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.026 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'yet.': 0.04; 'indication': 0.09; 'okay': 0.09; 'chained': 0.16; 'tuple': 0.16; 'tuples,': 0.16; ':-)': 0.16; 'wrote:': 0.18; "python's": 0.19; 'programming': 0.22; 'error': 0.23; "haven't": 0.24; '>': 0.26; 'suggested': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'raise': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; 'another': 0.32; 'could': 0.34; 'subject:with': 0.35; 'agree': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'consistent': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'catch': 0.60; 'here': 0.66; '2015': 0.84; 'alternative.': 0.84; 'subject:..': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=v9UwPMtJ+VcwGApIdcjaBU5FblxgrH6beyYv1jLpGUM=; b=nqNYDaEb/dqfzis0t4XssaCFrASu9u1LpWmfnUF+PQ8V7tdnw5SfktneKaZpDXLWW1 79FOgd8CuPV8uFbZEl/C0ExHs9UpqRxGBU9Bw6To7hDAEekoEkH8RhJvLKygO2Gauswd sylhNOl+DJdJiS51PXlbPzVNic/wW2/Chwb0RePz2jVxhryltZxu+YikOx/eZ6tCKOE7 lHrZABxTjELd52F9SflibU5Ri/946Tf5e7o+JssDrsQNQO7Kz5qZeZsFCJJQCbCevuk7 wf1HxVgqNBcYEa4oa8BHipdGJgJJJmCw8UJ3SGAr91ZptRtLjaHqBMXaMHscu8Pw5/1A G8xQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.25.225 with SMTP id f1mr6172113igg.29.1428778148515; Sat, 11 Apr 2015 11:49:08 -0700 (PDT) |
| In-Reply-To | <5528feec$0$13002$c3e8da3$5496439d@news.astraweb.com> |
| References | <d1e58c04-9c96-4fb8-a9ce-f56b9cdcd273@googlegroups.com> <mailman.217.1428744459.12925.python-list@python.org> <5528feec$0$13002$c3e8da3$5496439d@news.astraweb.com> |
| Date | Sat, 11 Apr 2015 12:49:08 -0600 |
| Subject | Re: try..except with empty exceptions |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| To | Python <python-list@python.org> |
| Content-Type | multipart/alternative; boundary=047d7bd76f7c01564c051377568b |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20 |
| 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.228.1428778155.12925.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1428778155 news.xs4all.nl 2905 [2001:888:2000:d::a6]:42563 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:88837 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Apr 11, 2015 5:06 AM, "Steven D'Aprano" < steve+comp.lang.python@pearwood.info> wrote: > > Yes, I agree that Python's behaviour here is better than the alternative. > Having "except ()" catch nothing is consistent with the behaviour with > other tuples, so I'm okay with that. But it still surprised me :-) There's another alternative that I haven't seen suggested yet. An empty tuple could be considered an indication of a programming error and raise a chained ValueError.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
try..except with empty exceptions Pavel S <pavel@schon.cz> - 2015-04-10 01:48 -0700
Re: try..except with empty exceptions Chris Angelico <rosuav@gmail.com> - 2015-04-10 18:58 +1000
Re: try..except with empty exceptions sohcahtoa82@gmail.com - 2015-04-10 12:31 -0700
Re: try..except with empty exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-11 11:42 +1000
Re: try..except with empty exceptions Dave Angel <davea@davea.name> - 2015-04-10 22:23 -0400
Re: try..except with empty exceptions Rustom Mody <rustompmody@gmail.com> - 2015-04-10 19:38 -0700
Re: try..except with empty exceptions Dave Angel <davea@davea.name> - 2015-04-10 23:46 -0400
Re: try..except with empty exceptions Rustom Mody <rustompmody@gmail.com> - 2015-04-10 21:17 -0700
Re: try..except with empty exceptions Rustom Mody <rustompmody@gmail.com> - 2015-04-10 21:39 -0700
Re: try..except with empty exceptions Cameron Simpson <cs@zip.com.au> - 2015-04-11 19:27 +1000
Re: try..except with empty exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-11 21:00 +1000
Re: try..except with empty exceptions Chris Angelico <rosuav@gmail.com> - 2015-04-11 21:21 +1000
Re: try..except with empty exceptions Ian Kelly <ian.g.kelly@gmail.com> - 2015-04-11 12:49 -0600
Re: try..except with empty exceptions Chris Angelico <rosuav@gmail.com> - 2015-04-12 06:04 +1000
Re: try..except with empty exceptions Chris Angelico <rosuav@gmail.com> - 2015-04-12 06:05 +1000
Re: try..except with empty exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-11 17:11 +1000
Re: try..except with empty exceptions Serhiy Storchaka <storchaka@gmail.com> - 2015-04-11 11:22 +0300
Re: try..except with empty exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-11 20:47 +1000
Re: try..except with empty exceptions Dave Angel <davea@davea.name> - 2015-04-11 06:14 -0400
Re: try..except with empty exceptions Dave Angel <davea@davea.name> - 2015-04-11 06:24 -0400
Re: try..except with empty exceptions Ian Foote <ian@feete.org> - 2015-04-11 15:20 +0100
Re: try..except with empty exceptions Terry Reedy <tjreedy@udel.edu> - 2015-04-11 04:58 -0400
Re: try..except with empty exceptions Dave Angel <davea@davea.name> - 2015-04-10 16:27 -0400
Re: try..except with empty exceptions Rustom Mody <rustompmody@gmail.com> - 2015-04-10 18:56 -0700
csiph-web