[wingide-users] Suggestions to prevent Indentation Errors
Tom Stambaugh
tms at zeetix.com
Sat Feb 14 09:36:54 MST 2009
DON'T EVER ATTEMPT TO MIX TABS AND SPACES IN THE SAME FILE!!!!!
This is the most important rule of Python indentation for beginners.
I prefer spaces over tabs, but that's more a matter of personal
preference -- *so long as you are consistent*.
Wing has great support for switching back and forth, and does a great
job of letting you know when you're dealing with a file that attempts to
mix them. While a file is open, be sure to pay attention to the
"Source->Current File Properties..." dialog, in addition to the
"Edit->Preferences...->Editor->Indentation" setting.
You can make life easier for yourself by ensuring that the "Show
Whitespace" property is turned on (checked) in the
"Edit->Preferences->Editor" window. That lets you see whatever is
actually in your source.
I strongly encourage you to leave auto-indent *on*, until you become
more proficient in Python.
Thanks,
Tom
----- Original Message -----
From: "Darren Anthony" <dtanthony2003 at yahoo.com>
To: <wingide-users at wingware.com>
Sent: Saturday, February 14, 2009 9:27 AM
Subject: [wingide-users] Suggestions to prevent Indentation Errors
I am a beginner Python user, using Wing IDE 101.
Can anyone offer some fail-safe tips to prevent errors. Should I turn
off auto-indent?
Should I use spaces, instead of tabs.
I seem to spend a lot of time fixing indentation errors and there is
probably an easier way. Not so much in beginning my code but after I
make changes.
Thank you for your support.
--------------------------------------------------------------------------------
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
More information about the wingide-users
mailing list