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


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

Re: except clause syntax question

Started byAaron <aaron.l.france@gmail.com>
First post2012-01-30 18:56 +0100
Last post2012-01-30 18:56 +0100
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 Aaron <aaron.l.france@gmail.com> - 2012-01-30 18:56 +0100

#19607 — Re: except clause syntax question

FromAaron <aaron.l.france@gmail.com>
Date2012-01-30 18:56 +0100
SubjectRe: except clause syntax question
Message-ID<mailman.5219.1327946266.27778.python-list@python.org>
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?

[toc] | [standalone]


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


csiph-web