[Python-Dev] Re: anonymous blocks

Rodrigo Dias Arruda Senra rodsenra at gpr.com.br
Mon Apr 25 16:38:51 CEST 2005


[ Simon Percivall ]:
> [ Terry Reedy ]:
> > with <target> as <value>:
> >
> > would parallel the for-statement header and read smoother to me.
> >
> > for <target> as <value>:
> >
> > would not need new keyword, but would require close reading to  
> > distinguish
> > 'as' from 'in'.
> 
> But it also moves the value to the right, removing focus. Wouldn't  
> "from"
> be a good keyword to overload here?
> 
> "in"/"with"/"for"/"" <value> from <target>:
>      <BODY>

 I do not have strong feelings about this issue, but for
 completeness sake...

 Mixing both suggestions:

 from <target> as <value>:
     <BODY>

 That resembles an import statement which some
 may consider good (syntax/keyword reuse) or
 very bad (confusion?, value focus).

 cheers,
 Senra

-- 
Rodrigo Senra                 
--
MSc Computer Engineer    rodsenra(at)gpr.com.br  
GPr Sistemas Ltda        http://www.gpr.com.br/ 
Personal Blog     http://rodsenra.blogspot.com/



More information about the Python-Dev mailing list