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


Groups > comp.lang.python > #19665

Re: except clause syntax question

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tuple': 0.09; 'am,': 0.12; 'syntax': 0.15; '(read': 0.16; 'places.': 0.16; 'reedy': 0.16; 'subject:syntax': 0.16; 'subject:question': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'header:In-Reply-To:1': 0.22; 'lists': 0.28; 'problem': 0.29; 'objects.': 0.30; 'tuples': 0.30; 'objects': 0.32; 'header:User- Agent:1': 0.33; 'to:addr:python-list': 0.33; 'object': 0.33; 'creates': 0.34; 'rather': 0.34; 'header:X-Complaints-To:1': 0.34; 'uses': 0.36; 'post': 0.36; 'received:org': 0.37; 'somewhat': 0.38; 'allows': 0.38; 'several': 0.38; 'hoping': 0.38; 'think': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'your': 0.61; '1.5': 0.64; 'charles': 0.67; 'collection': 0.68; 'viewed': 0.82
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: except clause syntax question
Date Tue, 31 Jan 2012 19:12:37 -0500
References <mailman.5218.1327946109.27778.python-list@python.org> <4f272f1f$0$29989$c3e8da3$5496439d@news.astraweb.com> <C481C0BC-63EF-45F9-B11F-A25D217249A6@declareSub.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-74-109-121-73.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
In-Reply-To <C481C0BC-63EF-45F9-B11F-A25D217249A6@declareSub.com>
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.5265.1328055170.27778.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328055170 news.xs4all.nl 6854 [2001:888:2000:d::a6]:56131
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19665

Show key headers only | View raw


On 1/31/2012 8:57 AM, Charles Yeomans wrote:

> In any case, though I appreciate your attempt at a post hoc justification,
 > I was hoping for a positive explanation.

I think the best you are going to get is that Python somewhat 
consistently*, for both practical and historical reasons#, uses tuples 
when the syntax allows an object or collection of objects.

* except, isinstance, isubclass, ''%x, perhaps other places.

In the last case, that creates a problem when one wants to interpolate a 
tuple as an object rather than having it viewed as a container of 
several objects to be interpolated. That was on

# Python once treated tuples as different from lists in ways that is not 
true now. (Read the 1.5 docs if really interested.)

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-30 12:41 -0500
  Re: except clause syntax question Mel Wilson <mwilson@the-wire.com> - 2012-01-30 14:15 -0500
  Re: except clause syntax question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-31 00:00 +0000
    Re: except clause syntax question Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-01-30 19:25 -0500
    Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-31 08:57 -0500
      Re: except clause syntax question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-31 14:51 +0000
        Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-31 11:23 -0500
        Re: except clause syntax question Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-01-31 11:38 -0500
        Re: except clause syntax question Charles Yeomans <charles@declaresub.com> - 2012-01-31 12:29 -0500
        Re: except clause syntax question Ethan Furman <ethan@stoneleaf.us> - 2012-01-31 08:56 -0800
    Re: except clause syntax question Terry Reedy <tjreedy@udel.edu> - 2012-01-31 19:12 -0500
    Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-31 19:27 -0500
  Re: except clause syntax question Mel Wilson <mwilson@the-wire.com> - 2012-01-31 08:24 -0500
    Re: except clause syntax question Charles Yeomans <charles@declareSub.com> - 2012-01-31 13:04 -0500
  Re: except clause syntax question Duncan Booth <duncan.booth@invalid.invalid> - 2012-01-31 22:03 +0000
    Re: except clause syntax question Chris Angelico <rosuav@gmail.com> - 2012-02-01 11:53 +1100
      Re: except clause syntax question Mel Wilson <mwilson@the-wire.com> - 2012-01-31 23:39 -0500
    Re: except clause syntax question Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-31 18:09 -0700
    Re: except clause syntax question Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-31 18:12 -0700
    Re: except clause syntax question Chris Angelico <rosuav@gmail.com> - 2012-02-01 13:46 +1100

csiph-web