[wxPython] wxPlotCanvas - bad indentation ?

The file is indented Ok, but in your editor look bad, what happend here is:
4 espaces = 1 indent step
1 tab = 2 indent step
In some editors (maybe emacs) this look ok, but other editors always use the
same space for a tab (4 spaces).

Personally I always use spaces (4 for every tab).
If you replace every tab for 8 spaces, I think everything will look ok.

···

-----Original Message-----
From: Kingshuk Mandal [SMTP:kingshuk@alumnux.com]
Sent: Monday, April 16, 2001 2:33 AM
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython] wxPlotCanvas - bad indentation ?

Hi List,

I was trying to understand wxPlotCanvas. After opening the file
wxPlotCanvas.py (which comes with python 2.0), I found indentation in that
file is totally messed up. As python is very much indentation dependent,
it
is very difficult to make out anything from this badly indented file. For
example you cannot make out where a for loop ends or where a if block
ends,
in this file. Can anybody tell me where I can get a proper (with proper
indentation) copy of this file. I also find there is a file named
wxPlotCanvas.pyc. How can one generate byte code from such badly indented
file ? As far as I understood, python should be able to detect these bad
indentation and should not generate byte code. TabNanny does complain that
this file does have tabbing problem. Still how are you able generate the
byte code ? Am I missing anything ?

Thanks,
Kingshuk

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

"Echeverria Rabi, Cristian Rodrigo, TRANSELEC S.A." wrote:

The file is indented Ok, but in your editor look bad, what happend here is:
4 espaces = 1 indent step
1 tab = 2 indent step
In some editors (maybe emacs) this look ok, but other editors always use the
same space for a tab (4 spaces).

Hmmm. I thought the general recommendation was:

4 spaces = 1 indent step
1 tab = 8 spaces ( = two indent steps when mixing tabs and spaces)

Anyway, emacs hides this, because it guesses the tab - spaces relation
from the file.

But on the Python site, under Python Patch Style Guidelines it is
clearly stated that
tabs should be 8 bytes. Here is an excerpt from these guidelines:

Python Patch Style Guidelines

Here are some style guidelines for the production of high quality
patches to Python. See the patch
...
Please match the existing coding style whenever you can. Use the
existing indentation style in
the file you are editing. (There are two styles: some files use tabs
exclusively for indentation,
others use 4-space indents. The latter is preferred for new files. A tab
character should always
be equivalent to 8 spaces, not 4 as is the default in most editors on
Mac and Windows.) Make
sure all lines fit in 78 columns. When submitting C code, don't use C++
style (//) comments.
...

- Josef