Alan> "Ben Finney" <[EMAIL PROTECTED]> wrote in message Alan> news:[EMAIL PROTECTED] >> Sticking to spaces for indentation avoids the ambiguity of >> interpretation that ASCII TAB characters are subject to.
Alan> What ambiguity? Alan> Tabs are *less* ambiguous. Alan> One tab character is one level of indentation. Alan> I have never seen this violated. The ambiguity comes when eventually your source is edited by someone else. Perhaps you have the discipline to use only spaces or only tabs, but the guy in the next cubicle is as likely to use spaces as you are to use tabs. Once he edits a file the two of you share, you're toast. This is not a new topic. After a lot of discussion over the years the general consensus in the Python community is that spaces are the only way to go. Here are some references: http://www.python.org/dev/peps/pep-0666/ http://mail.python.org/pipermail/python-list/2003-January/183758.html http://wiki.w4py.org/spaces-not-tabs.html The Python distribution even comes with two scripts, tabnanny and reindent, which were developed to detect and eliminate the ambiguity caused by mixing spaces and tabs. The beginning of the reindent doc string reads: Change Python (.py) files to use 4-space indents and no hard tab characters. Also trim excess spaces and tabs from ends of lines, and remove empty lines at the end of files. Also ensure the last line ends with a newline. If only tabs were considered to be a viable alternative to only spaces, reindent would almost certainly have grown a flag by now to allow that. The tag line for tabnanny reads: The Tab Nanny despises ambiguous indentation. She knows no mercy. Finally, note this from PEP 666: The problem is that there is no polite way to say 'Stop wasting your valuable time and mine.' That's as politely as I can put it. Skip -- http://mail.python.org/mailman/listinfo/python-list