statements and blocks

Alexander Williams thantos at chancel.org
Sat Jan 29 04:58:30 EST 2000


On Sat, 29 Jan 2000 05:17:29 GMT, rdudfield at my-deja.com
<rdudfield at my-deja.com> wrote:

>I find indentation is better in most cases except this.  This isn't too
>much trouble, as I usually find the problem pretty quickly.  However
>occasionally I waste a bit too much time on it than I'd like to :)

Two things:

If your function is more than a page long, odds are you need to break
it up into multiple functions.  Python is a highly expressive
language; use that to encapsulate and combine smaller functionality
into larger structures.  In the long run, you'll be thankful.

Using a wider default indentation per level can help make things more
visually apparent as to indentation.  2 charas is easy to miss, but
its harder to miss being off by 4 or 8 chara.

-- 
Alexander Williams (thantos at gw.total-web.net)           | In the End,
  "Join the secret struggle for the soul of the world." | Oblivion
  Nobilis, a new Kind of RPG                            | Always
  http://www.chancel.org                                | Wins



More information about the Python-list mailing list