Style question...

Erik Max Francis max at alcyone.com
Wed Aug 27 23:34:50 EDT 2003


Chad Netzer wrote:

> But, this technique will STILL fail on multiply nested loops, etc.
> (emacs does it's best, but it cannot mind read)  So it is a terrible
> habit to get into, because it WILL cause you problems if relied upon
> blindly.
> 
> So, it is better to NOT rely on the 'pass' crutch, and instead rely on
> the python mode operations for reindenting blocks of code (which Eric
> provided; surely this is becoming a FAQ)

Agreed.  If you're going to write code in a particular language, you
should fully embrace the language and its style, or move on to something
that you feel more comfortable with.  These kind of crutches will only
serve to bite you later -- they aren't panaceas, and you may forget to
use them or be hobbled when interacting with someone else's code (where
you're not going to convince others to use your crutches).  There's also
an indirect effect; if I'm reading someone else's Python code, and, say,
see someone using semicolons as statement delimiters on every line, I'm
not exactly going to be struck with a great deal of confidence.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ Don't ever get discouraged / There's always / A better day
\__/  TLC




More information about the Python-list mailing list