A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/042931.html below:

[Python-Dev] PEP 318 - function/method/class decoration

[Python-Dev] PEP 318 - function/method/class decoration [Python-Dev] PEP 318 - function/method/class decorationBernhard Herzog bh at intevation.de
Sat Mar 6 12:42:40 EST 2004
Bob Ippolito <bob at redivi.com> writes:

> On Mar 6, 2004, at 12:17 PM, Bernhard Herzog wrote:
>
>> Bob Ippolito <bob at redivi.com> writes:
>>
>>> This proposed new syntax is:
>>>
>>> 	funcdef: 'def' NAME parameters ['[' exprlist ']' ] ':' suite
>>>
>>> 	classdef: 'class' NAME ['(' testlist ')'] ['[' exprlist ']'] ':'
>>> suite
>>
>> Why are the decorators an exprlist while the base classes are a
>> testlist?
>
> The testlist is the list of base classes..  In both cases, the
> decorators are an '[' exprlist ']'

That much was obvious enough :).  What I meant was: Why are the
decorators an exprlist and not a testlist?  The base classes are a test
list and the elements of a list-literal that (listmaker in Grammar) are
effectively a testlist too, so it's not obvious why the decorators
should not also be a testlist.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4