Tabbing/Spaces

Martin Sandin msandin at remove_this.hotmail.com
Sat Jan 20 03:49:27 EST 2001


"Tim Peters" <tim.one at home.com> skrev i meddelandet
news:mailman.979955644.18879.python-list at python.org...

> *Mixing* tabs and spaces is insane in Python source.

Insane it might be, but it is what is "recommended" in GvR's style guide:

'Tabs or Spaces?
One indentation level is 4 spaces. Two levels is one tab. Three levels is a
tab and 4 spaces, and so on. Python doesn't mind if you indent one line with
8 spaces and the next line with a tab -- they are considered to have the
same indentation. Replacing all tabs with spaces is more robust in the light
of some editors on the Mac or PC (which default to displaying the tab
character as 4 spaces instead of 8, as God intended) but this can be done on
transfer to such platforms.'

Available from python.org, documentations GvR's essays :-)

Me? A tab is 4 spaces, I hard tab indent my code. It's the easiest and
fastest way for moving my code tab levels.

-
Martin
come.to/vague





More information about the Python-list mailing list