[Python-3000] Single-line blocks? (original) (raw)

Baptiste Carvello baptiste13 at altern.org
Fri Mar 23 23:34:38 CET 2007


Aahz a écrit :

IIRC, there was some discussion about removing single-line blocks like this one in 3.0:

if foo: bar() However, I can't find any discussion about making it happen, and it's not in PEP 3099. Guido, does this need a PEP? Do you want it to happen?

please no.

Single line blocks may be bad style in programs, but they are very useful in interactive use. Indeed, with readline, re-executing a single line block is as easy as going up in the history. By contrast, multi-line block are a pain.

Baptiste



More information about the Python-3000 mailing list