Jason Orendorff wrote:

> Honestly, I think I would prefer this syntax.  Examples from real
> code, before and after:
> 
>     lines = [line for line in pr.block.body
>              if line.logical_line.strip() != '']
>     lines = [for line in pr.block.body:
>                  if line.logical_line.strip() != '':
>                      line]
> 
>     row.values = \
>       [line[col.start:col.end].strip() for col in columns]
>     row.values = \
>       [for col in columns: line[col.start:col.end].rstrip()]
> 
>     return [p for p in self.listdir(pattern) if p.isdir()]
>     return [for p in self.listdir(pattern): if p.isdir(): p]

-1. Too much similarity with the for/if statement. People would say
"why can we put a for statement in brackets but not a try statement".

Reinhold

-- 
Mail address is perfectly valid!

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to