[Python-3000] Switch and static, redux

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jul 6 02:39:50 CEST 2006


Georg Brandl wrote:

> I'm not very comfortable about the no-additional-indentation-after-colon
> syntax too, but I also realize that requiring two levels of indentation
> for a single statement is too much.

That's a matter of opinion. I don't have any trouble
with it, but then I don't tend to set my indentation
levels very high.

On the other hand, I am bothered by *not* indenting
the cases. They're all subordinate to the switch,
so they should be indented, I feel.

Maybe a compromise could be reached by having the
style guide recommend a two-space indent for the
cases, and a further two-space indent for the
case bodies. Then the overall indentation of the
bodies would still be only four spaces.

--
Greg


More information about the Python-3000 mailing list