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


Groups > comp.lang.python > #17758

Re: Grammar for classes

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; 'received:verizon.net': 0.07; 'something,': 0.07; 'terry': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'wrong,': 0.09; 'am,': 0.12; '2.7': 0.13; '"("': 0.16; '")"': 0.16; '::=': 0.16; 'experiments': 0.16; 'input.': 0.16; 'kern': 0.16; 'reedy': 0.16; 'report?': 0.16; 'subject:classes': 0.16; 'syntax': 0.16; 'wrote:': 0.18; 'jan': 0.19; 'thorough': 0.21; 'header:In-Reply- To:1': 0.22; 'statement': 0.23; 'versions': 0.23; 'defined': 0.24; 'says': 0.25; 'ignore': 0.26; 'code.': 0.26; 'skip:[ 10': 0.27; 'do.': 0.28; 'pm,': 0.29; 'class': 0.29; '3.x': 0.30; 'thanks': 0.31; 'does': 0.32; 'go.': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.33; 'to:addr:python-list': 0.34; 'doc': 0.34; 'surprised': 0.34; 'url:python': 0.36; 'file': 0.36; 'reference': 0.37; 'received:org': 0.38; 'url:docs': 0.39; 'url:org': 0.39; 'should': 0.39; 'to:addr:python.org': 0.40; '2011': 0.61; 'beats': 0.84; 'url:reference': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Grammar for classes
Date Thu, 22 Dec 2011 18:39:34 -0500
References <CAN1F8qWV1j-2VDvMyh47dxfj4G_yXSP8rcUdmpBY-HLrD5gaUQ@mail.gmail.com> <jcppjc$va7$1@dough.gmane.org> <CAN1F8qXjE0zPrUjC-Kih=gCm=pv4mwGPCvT+Y5EE3XVwVw3WwA@mail.gmail.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 <CAN1F8qXjE0zPrUjC-Kih=gCm=pv4mwGPCvT+Y5EE3XVwVw3WwA@mail.gmail.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.4004.1324597206.27778.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1324597206 news.xs4all.nl 6971 [2001:888:2000:d::a6]:35264
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17758

Show key headers only | View raw


On 12/20/2011 12:05 PM, Joshua Landau wrote:
> On 20 December 2011 10:55, Robert Kern <robert.kern@gmail.com
> <mailto:robert.kern@gmail.com>> wrote:
>
>     On 12/20/11 1:34 AM, Joshua Landau wrote:
>
>         In reading thorough the syntax defined in the reference
>         <http://docs.python.org/py3k/reference/compound_stmts.html#class-definitions>>,
>
>         the class statement has surprised me.
>
>         It says that the inheritance part of the class can accept
>         comprehensions. What
>         does this mean?

Beats me. The 2.7 doc says inheritance ::=  "(" [expression_list] ")" 
and I no on no 3.x change/addition. My experiments with both genexp and 
listcomp versions gave errors.

> I ignore valid code. Thanks Ian and Robert for the input. Should I file
> a documentation bug report?

Please do. It the addition means something, it needs to be explained in 
the text. If it is wrong, it should go.

-- 
Terry Jan Reedy

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


Thread

Re: Grammar for classes Terry Reedy <tjreedy@udel.edu> - 2011-12-22 18:39 -0500

csiph-web