allowing braces around suites
Kjetil Torgrim Homme
kjetilho at yksi.ifi.uio.no
Fri Aug 27 09:42:54 EDT 2004
[Isaac To]:
>
> If the aim is simply to do a local change that is sufficient to
> deal with the problem just in your computer, then the simplest
> answer might be to use "pass": if your code contains
>
> if t1 == t2:
> t1 = t3
> else:
> t2 = t3
> pass
> t = t2
>
> and you tab at the last line, Emacs won't try to indent the t=t2
> line further to after the pass line where it is impossible to
> execute.
interesting idea, but Python won't discover inconsistencies. if only
an Emacs solution is sought, a "# end" convention is preferable since
it's more explicit. an explicit convention that Python recognises
would be even better.
> If you want something that is done globally and everybody will use
> it... not a chance.
I don't expect everybody to use it. miscellaneous projects where the
developers are comfortable with it might want to add it to their
coding standards.
--
Kjetil T.
More information about the Python-list
mailing list