[olug] ANN: Omaha Python Users Group Meeting, Aug 1 @ 7pm

Jeff Hinrichs - DM&T jeffh at dundeemt.com
Tue Jul 31 02:43:17 UTC 2007


On 7/30/07, Jay Hannah <jay at jays.net> wrote:
> On Mon, 30 Jul 2007, Luke -Jr wrote:
> > I find it fairly annoying that Python requires indentation as syntax. When I
> > modify code, I try to change as little as possible to minimize the diff, but
> > with Python, removing an 'if' means removing an entire level of indentation
> > on every line subsequent...
>
> Which is best practice anyway. Perl's flexibility is great when you need
> it, but 99% of your if blocks should be indented. So if you remove an if
> you'll re-indent the block.
>
> Assuming you want yourself and others to be able to read your code.  :)
>
I strongly second Jay's comments about indentation, in any language.
The whitespace in Python was natural for me.  But if you look at
anything I've written from DEC assembly to Erlang, you'll see I'm OCD
about indentation.  imho, I should be able to look at any code and see
the structure without reading.  Nothing different than writing a paper
-- often code occurs via a brain dump but it isn't finished until it's
formatted.

There is a mental model for every language and if your code
formatting, or lack there of, results in cognitive dissonance it's a
bug.

> $0.02,
I call. ;)
>
> j
> Omaha Perl Mongers:  http://omaha.pm.org
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>


-- 
Jeff Hinrichs
www.omahapython.org



More information about the OLUG mailing list