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


Groups > comp.lang.python > #19608 > unrolled thread

Re: except clause syntax question

Started byCharles Yeomans <charles@declareSub.com>
First post2012-01-30 13:56 -0500
Last post2012-01-30 13:56 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-30 13:56 -0500

#19608 — Re: except clause syntax question

FromCharles Yeomans <charles@declareSub.com>
Date2012-01-30 13:56 -0500
SubjectRe: except clause syntax question
Message-ID<mailman.5220.1327949774.27778.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web