Re: Programming first steps.
On 17-Nov-03, 09:13 (CST), Cameron Patrick <email@example.com> wrote:
> On Mon, Nov 17, 2003 at 08:49:03AM -0600, Steve Greenland wrote:
> | As a long-time C coder, I agreed with you. But after doing a small
> | python project, I was surprised at how quickly it became natural. It
> | does help to have an editor that ensures you don't mix spaces and tabs.
> I believe that tabs aren't a problem with Python so long as they really
> do indent to a multiple of 8 spaces. Editors which interpret tabs
> differently are broken^W^W can cause problems when editing Python code
> with tabs and spaces mixed though.
To clarify: AFAICT, Python is perfectly happy with any sort of
indentation you choose, so long as it's consistent in any given block.
You want to use '<space><space><tab>', fine. Just don't try to mix it
with '<space><tab>' in the same block.
As a practical matter, since the above are likely to be visually
indistinguishable, you need an editor that always produces exactly the
same character combination for a given number of columns of indent. For
me, since I sometimes adjust indentation with the TAB key, and sometimes
with the SPACE key, having the editor convert everything to <space>
Works For Me(tm).
I would expect any editor that claims to have a Python mode to DTRT.
The irony is that Bill Gates claims to be making a stable operating
system and Linus Torvalds claims to be trying to take over the
world. -- seen on the net