Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'terry': 0.07; 'parsing': 0.09; '2.7': 0.13; '")"': 0.16; '4:39': 0.16; '::=': 0.16; 'attribute,': 0.16; 'declaration': 0.16; 'metaclass': 0.16; 'reedy': 0.16; 'subject:classes': 0.16; 'cc:addr:python-list': 0.16; 'received:74.125.82.44': 0.16; 'received:mail- ww0-f44.google.com': 0.16; 'wrote:': 0.18; 'specifies': 0.18; 'cc:no real name:2**0': 0.20; 'cheers,': 0.20; 'dec': 0.22; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'cc:2**0': 0.24; 'keyword': 0.24; 'says': 0.25; 'parameters': 0.25; 'function': 0.27; 'skip:[ 10': 0.27; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'pm,': 0.29; 'class': 0.29; '22,': 0.30; '3.x': 0.30; 'thu,': 0.32; 'list': 0.32; 'instead': 0.33; 'there': 0.33; 'doc': 0.34; 'received:74.125.82': 0.35; 'explain': 0.36; 'but': 0.37; 'passed': 0.37; 'received:74.125': 0.37; 'received:google.com': 0.37; 'skip:_ 10': 0.37; 'using': 0.38; 'why': 0.39; 'might': 0.40; 'more': 0.61; '2011': 0.61; 'accepts': 0.64; 'receive': 0.68; 'wish': 0.70; 'beats': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=oFaMMA30J5LwX2r7A3yEEz7pftofsEmVT/Tihnbqz/c=; b=LOvNOdOTWoSEgAo0T5fvSwFcSzSckscbSB0eq6SeHeWYse/AdQmfAKNxwr4AepbvPk ABAZnEZjLy5+xekwvCSJbJEeAk1je1MLWRikR7CIzkVkikiLBRRSxxj6V9u6fyruh9BK Cgipqlhd3xC+3RaWJsaGZvh2TEtaLGbnacC08= MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Thu, 22 Dec 2011 18:27:54 -0700 Subject: Re: Grammar for classes To: Terry Reedy Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1324603713 news.xs4all.nl 6844 [2001:888:2000:d::a6]:59733 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17763 On Thu, Dec 22, 2011 at 4:39 PM, Terry Reedy wrote: > Beats me. The 2.7 doc says inheritance ::=3D =A0"(" [expression_list] ")"= and I > no on no 3.x change/addition. Well, there is one change in 3.x which is that the inheritance list now accepts keyword parameters (PEP 3115) -- the "metaclass" keyword specifies the metaclass instead of using a bogus __metaclass__ attribute, and any other keywords are passed along to the metaclass. That's why the parsing of the inheritance list was generalized to look more like a function call, but it doesn't explain why the class declaration might wish to receive a comprehension. Cheers, Ian