Indent testers needed (Prothon)

Michael Geary Mike at DeleteThis.Geary.com
Sat Apr 3 11:50:09 EST 2004


Josiah Carlson wrote:
> >>/* loop 2 */
> >>ix = 2
> >>for
> >>  item
> >>    in
> >>      blist
> >>        :
> >>          alist[ix] =
> >>               alist[
> >>          ix
> >>          ]
> >
> ...
> The above code shows how you can make Prothon code
> extraordinarily ugly by exploting the continuation rules.
> Certainly most people don't see such ugly continuations
> in Python, but I think rule #3 is begging for trouble.

That's a strawman. The fact that you *could* write strange code like that
doesn't mean that there is anything wrong with Mark's continuation rules.

I could write a long Python program that uses no functions, classes, or
anything else to break it into smaller understandable pieces. Just one big
long piece of code that is indented to twenty levels. While I'm at it, I'll
use variable names that obscure what the code does.

Does that imply that there should be a maximum length to a Python source
file, a limit on the level of indenting, and restrictions on what variable
names I can use? Of course not.

-Mike





More information about the Python-list mailing list