Indent testers needed (Prothon)

Mark Hahn mark at prothon.org
Fri Apr 2 22:41:40 EST 2004


We're  proud to say that Prothon has grown out of the indent space/tab flame
war stage and has moved on to more serious discussions.

We've decided to allow space-based indents and tab-based indents but not in
the same file.  We are also adding some improvements in the area of line
continuations (see the algorithm at the end of the message).

Since there were zillions of messages here on c.l.py about spaces vs. tabs
and Guido has said he wants to remove tab support, I thought maybe some of
you might help us test our implementation of this indentation algorithm.

Can I get a few space lovers and tab lovers to download this windows
executable and tell us if this makes them happy?  If you keep your Python
code simple and free of class statements, you don't have to learn Prothon to
try it.  You can't use the interactive console to evaluate the algorithm,
you will need to write *.pr code files and run them.  Note:  This is not a
real Prothon release.  It has not been through normal testing.  Use it only
for indent testing.

The zip file (350K) is at:

http://prothon.org/pub/prothon/Prothon-unstable-b255-win32.zip

Unzip the file which will make a folder called win32.  Drop your .pr file
into the folder.  Open a dos command window. CD to the win32 folder and run
the prothon.exe file with the .pr file name:

prothon.exe code.pr

Features:

1) You must use only tabs or only spaces for indents in any one file. You
cannot mix them.

2) Each indent level can have any number of characters more than the
previous level, whether you are using tabs or spaces.  If you drop back to
the left to dedent, and your column position does not match any level above,
you will get a lexer error.

3) If you  increase the indentation level above the previous line by even
one space, and that previous line does not end in a colon, then the new line
will be considered a continuation of the previous line.

4) If a line contains an active (not quoted or commented)  (, {, or [
without a matching end character, then the following line is always a
continuation, no matter what that following line contains.

5) There is still support for using the trailing backslash ( \ ) to indicate
that the next line is a continuation.  This may be removed in the future if
everyone agrees to do so.






More information about the Python-list mailing list