[Python-Dev] PEP 318 - generality of list; restrictions on
elements
Michael Hudson
mwh at python.net
Thu Mar 11 05:45:48 EST 2004
Aahz <aahz at pythoncraft.com> writes:
> On Thu, Mar 11, 2004, Greg Ewing wrote:
>> Aahz <aahz at pythoncraft.com>:
>>>
>>> * A single identifier (which must be a callable)
>>>
>>> * Comma-separated list of identifiers (which must be callables)
>>>
>>> * Arbitrary expression (which must produce a sequence of callables)
>>
>> You left out
>>
>> * Comma-separated list of arbitrary expressions
>>
>> which is the one I'm in favor of.
>
> If we allow truly arbitrary expressions, that comes for free, by
> definition. ;-)
Yes, but that's not the point! What my patch currently allows is a
'exprlist', whuch is a "comma-separated list of arbitrary
expressions", and is The Only Sane Choice (tm). Allowing a listmaker
(or whatever that production is called) and so list comprehensions is
barmy.
Besides, a literal reading of
Arbitrary expression (which must produce a sequence of callables)
would suggest
def foo [staticmethod] ():
pass
was in error!
Cheers,
mwh
--
Now this is what I don't get. Nobody said absolutely anything
bad about anything. Yet it is always possible to just pull
random flames out of ones ass.
-- http://www.advogato.org/person/vicious/diary.html?start=60
More information about the Python-Dev
mailing list