[Novalug] Learning Python ???
James Ewing
jecottrell3@comcast.net
Fri Mar 22 20:59:40 EDT 2013
Whitespace is definitely important, but Python seems to work Just Fine with Tabs.
Tab Stops are set every Eight Spaces by Divine Fiat. If you are having a problem with running out of space, your Functions are Too Long.
However, once in awhile I will break my own rule, nesting several loops, adding 4 extra spaces to alternate loops, and things still work.
Whatever you do, DO NOT try and display and/or print Real Tabs with anything BUT 8 Spaces...
either use them As They Were Intended, or Not At All.
JIM
----- Original Message -----
From: "Rob Sanders" <rarob@travelinglightfarm.net>
To: "Novalug" <novalug@calypso.tux.org>
Sent: Friday, March 22, 2013 7:26:38 PM
Subject: Re: [Novalug] Learning Python ???
Greg,
....and also mention the *single* biggest hurdle that I've had with python. Scoping is indicated by indentation, so whitespace is *important*. Pick an editor of choice, disable the use of tab characters (or have them explicitly replaced by spaces - this is what I did with nedit), and decide upon a CONSISTENT indentation style (I tend to use 4 spaces).
-Rob
More information about the Novalug
mailing list