[Python-ideas] Where-statement (Proposal for function expressions)

Jan Kaliszewski zuo at chopin.edu.pl
Sat Jul 18 14:59:11 CEST 2009


Gerald Britton <gerald.britton at gmail.com> wrote:

> About return, yield and their ilk in where clauses:
>
> don't do it!
>
> Seriously,  a where clause should be restricted to providing
> definitions for the things in the statement for which the where clause
> is specified.  Today, we can't do a return (with argument) in a
> generator function, which makes sense.  A where clause should not
> allow returns or yields or in general actions that explicitly transfer
> control beyond the statement.

+1

-- 
Jan Kaliszewski <zuo at chopin.edu.pl>



More information about the Python-ideas mailing list