Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19608
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <charles@declareSub.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.114 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.77; '*S*': 0.00; 'suppose': 0.05; 'exception': 0.12; 'block,': 0.16; 'semantically': 0.16; 'subject:syntax': 0.16; 'tuples,': 0.16; 'why,': 0.16; 'subject:question': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'header:In- Reply-To:1': 0.22; "shouldn't": 0.23; 'pm,': 0.26; "i'm": 0.27; 'list"': 0.30; 'x-mailer:apple mail (2.1084)': 0.30; 'to:addr :python-list': 0.33; 'match': 0.33; 'wondering': 0.34; 'latter': 0.34; 'opposed': 0.36; 'charset:us-ascii': 0.36; 'but': 0.37; 'why': 0.39; 'except': 0.39; 'sense': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'type': 0.60; 'types': 0.61; 'more': 0.61; 'header:Message-Id:1': 0.62; 'aaron': 0.67; 'charles': 0.67; '30,': 0.74; '12:56': 0.84; '2012,': 0.84; 'received:64.191': 0.84; 'lists:': 0.91 |
| Content-Type | text/plain; charset=us-ascii |
| Mime-Version | 1.0 (Apple Message framework v1084) |
| Subject | Re: except clause syntax question |
| From | Charles Yeomans <charles@declareSub.com> |
| In-Reply-To | <4F26D9C7.6020109@gmail.com> |
| Date | Mon, 30 Jan 2012 13:56:07 -0500 |
| Content-Transfer-Encoding | quoted-printable |
| References | <E1A3D6A5-CCE8-4D87-82E0-938159D0CE61@declareSub.com> <4F26D9C7.6020109@gmail.com> |
| To | Python <python-list@python.org> |
| X-Mailer | Apple Mail (2.1084) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5220.1327949774.27778.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1327949774 news.xs4all.nl 6890 [2001:888:2000:d::a6]:48178 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:19608 |
Show key headers only | View raw
On Jan 30, 2012, at 12:56 PM, Aaron wrote: > On 01/30/2012 06:41 PM, Charles Yeomans wrote: >> To catch more than one exception type in an except block, one writes >> >> except (A, B, C) as e: >> >> I'm wondering why it was decided to match tuples, but not lists: >> >> except [A, B, C] as e: >> >> The latter makes more sense semantically to me -- "catch all exception types in a list" as opposed to "catch this single thing composed of three exception types". >> >> >> Charles Yeomans >> >> > > Then, semantically, shouldn't it be a set? Why, I suppose that would make even more sense. Charles Yeomans
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-30 13:56 -0500
csiph-web