autocoding project proposal

Sean 'Shaleh' Perry shalehperry at attbi.com
Mon Jan 21 12:46:16 EST 2002


> 
> You are refering to indentation. The autocoding process should only needs
> to keep track of how deep the code it is currently dealing with is. Really
> no different than how you or I do it. In fact the computer is far more
> likely to not lose track of how deep it is, and if it does, then we should
> be able to fix it.
> 
> I'm interested in knowing what sort of autocoding tools you have looked at
> or considered creating, that indentation is difficult to solve. It might
> help for me to better explain.
> 
> If you are refering to the bit of python code I've done, then know that
> it's only the focus of one of nine comands having only enough of the
> others to enable it's basic operation as a stand alone command. In a more
> complete form there will be more control of depth and keeping track of it.
> 

I haev looked at it for much smaller, almost one off uses.  As you suggest, I
always seem to end up with an 'indentation_level' variable and code doing
something like:

line = (indentation_level * ' ') + data

It just always feels more soupy.  Being able to say 'int main() { foo; bar;
baz; }' makes machine generated coding go a little easier.  But I am sure that
is not for long term projects like yours.  Different issues for small scale
versus large scale.  Adding the necessary python code for mine always seemed
like overkill.  In your case what is 10 or 20 more lines of code in a 100 -
1000+ line app.




More information about the Python-list mailing list