[Python-Dev] PEP 340: propose to get rid of 'as' keyword

Bob Ippolito bob at redivi.com
Wed May 4 20:45:25 CEST 2005


On May 4, 2005, at 2:29 PM, Fredrik Lundh wrote:

> Gustavo J. A. M. Carneiro wrote:
>
>
>>   I have not read every email about this subject, so sorry if this  
>> has
>> already been mentioned.
>>
>>   In PEP 340 I read:
>>
>>         block EXPR1 as VAR1:
>>             BLOCK1
>>
>>   I think it would be much clearer this (plus you save one keyword):
>>
>>         block VAR1 = EXPR1:
>>             BLOCK1
>>
>
> clearer for whom?   where else is this construct used in Python?

It might be more clear to have the "var" on the left.  The only place  
it's used on the right (that I know of) is in import statements when  
using the "as" clause.  Assignment, for loops, generator expressions,  
list comprehensions, etc. always have the var on the left.

-bob



More information about the Python-Dev mailing list