On Sat, 28 Mar 2009 11:30:36 -0000, Coonay <[email protected]> wrote:
during last few days, i code python using notepad++ or pydev, the
compiler always complain there is a problem with Indentation,in my
eyes ,there is no Indentation problem at all,because i format the code
to make it comply with python style guide strictly,but after i change
the default tab length ,it works.
If you're mixing tabs and spaces, which from your description you are,
then you aren't complying strictly with the Python style guide. PEP 8
says:
"""
Tabs or Spaces?
Never mix tabs and spaces.
"""
Clearly the compiler was considering tabs to be a different width to
your editor's initial setting. Where you saw:
Line starting with 8 spaces
Line starting with a tab
in the editor window, the compiler instead saw:
Line starting with 8 spaces
Line starting with a tab
or something like that. Running with "python -t" will warn you about
this sort of thing.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list