[Python-ideas] combine for/with statement
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Aug 3 10:11:25 CEST 2011
Chris Rebert wrote:
> Where would it end? What if someone wants:
> for bar in foo with context if baz:
> # stuff
With a slight relaxation of the rules concerning statements
on a single line, one could write
for bar in foo: with context: if baz:
# stuff
Not that I'd really advocate that, but it might help to
shut up the people who keep requesting this sort of thing.
--
Greg
More information about the Python-ideas
mailing list