Indentation of Python programs vs. block delimiters

Jaap Vermeulen (
Fri, 13 May 94 17:07:17 GMT

Reading some of the arguments and comparing it with my own use gave me
this idea.

Given that there are C formatters that do a decent job (indent), it
should be possible to write a Python formatter (written in Python :-)
that accepts block delimiters and formats the code accordingly. This
could be a two way function, in that the formatter could take well
formatted Python code and add delimiters.

If the Python compiler would allow for an optional filter, you're all
set. This can even work with code within a string literal, given that
the formatter is smart enough to recognize it and know how to add
newlines to a string literal.

Of course, this will not solve the coding for C programs calling the
Python interpreter (unless... :-).

Anyways, just a thought.



Jaap Vermeulen					+--------------------------+
						| Sequent Computer Systems |
	Internet :		| Beaverton, Oregon	   |
	Uucp	 : ...uunet!sequent!jaap	+--------------------------+