Styling Temporary Code
Pete Shinners
pete at visionart.com
Thu Jun 1 14:21:47 EDT 2000
I've been developing in C for several years and have
really been enjoying python recently.
one thing i do frequenctly in C is to place temporary
"debug/doublecheck/sanity" type code while i'm developing
it. i always put this code in with no indenting, so it's
easy to spot, work with, and cleanup. it looks something
like this...
int myfunc(int nullargs)
{
int newval = do_fancy_stuff(nullargs);
cout << "newval = " << newval << endl;
return more_fancy(newval);
}
ok, in this 5 line example it doesn't really sparkly,
but when i use it in big sections of code, it can't
be beat. call it the mark of the beast, chase me with
pitchforks, i simply love it and i don't want to change!
now in python this obviously won't work, but i haven't
been able to settle on a style that works for me yet.
what do other people use for this "working" code?
More information about the Python-list
mailing list