python3: 'where' keyword

Andrey Tatarinov elephantum at dezcom.mephi.ru
Sun Jan 9 06:21:59 EST 2005


Nick Coghlan wrote:
> Current:
>   assignment_stmt ::= (target_list "=")+ expression_list
>   augmented_assignment_stmt ::=    target augop expression_list
> 
> New:
>   assignment_stmt ::= (target_list "=")+ expression_list [where_clause]
>   augmented_assignment_stmt ::=    target augop expression_list 
> [where_clause]
>   where_clause ::= "where" ":" suite
> 
> So the expressions in existing compound statements (for, while, if, 
> elif) would be out of luck. You could conceivably add the 'where' clause 
> to the end of those as well, to give statement local variables that 
> apply to the whole compound statement:

Nick, you're good at formalization, thanks again.

So it seems that people loved the idea of 'where' keyword, may be it's 
time to think about PEP draft? I appreciate any help (cause my english 
is not that good =)).



More information about the Python-list mailing list