[Python-Dev] Making -tt the default

Fred L. Drake, Jr. fdrake@beopen.com
Tue, 4 Jul 2000 00:35:00 -0400 (EDT)

  The recent discussion about the possibility of specialized forms of
SyntaxError for indentation and tab/space issues brings up the problem
of the -t/-tt options to the interpreter.
  If a distinct exception is defined for indentation-related errors,
that could probably be implemented and tested without regard for the
-t/-tt setting, except for the tab/space exception.  That exception is
only raised when -tt is specified, and there's no way from Python to
determine if it is set except for testing to see that the exception is
raised when ambiguous tab/space combinations are presented to the
  This reminds us that most programmers aren't going to bother with
the -tt option; it's something extra that they don't really need to
get the job done.  Life without it, however, is shakey: Python code is
harder to share than it needs to be because nobody can rely on
non-ambiguous tab/space usage.  If -tt were the default, the problem
would not be discovered after code is deployed but, rather, before it
is otherwise tested by the original developers and maintainers.
  There are two things that can be done:  have distutils always use
-tt when compiling code that gets installed (using a child interpreter
if needed), and setting -tt as the default in the next Python
release.  Using -tt in the distutils will cause this setting to be
used with Python 1.5.2 installations.
  Setting -tt to be the default, and not having a way to override it,
would lead to some small code simplifications as well.


Fred L. Drake, Jr.  <fdrake at beopen.com>
BeOpen PythonLabs Team Member