New submission from Jakub Wilk <jw...@jwilk.net>:

Python 3 is more rigid about mixing tabs and spaces within a single file. 2to3 
should either fix indentation that would become a syntax error in Python 3.X, 
or maybe issue a warning about it (or both).

Example:

$ python badtabs.py && echo okay
okay

$ 2to3 badtabs.py 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No files need to be modified.

$ python3 badtabs.py && echo okay
  File "badtabs.py", line 3
    'b'
      ^
TabError: inconsistent use of tabs and spaces in indentation

----------
components: 2to3 (2.x to 3.x conversion tool)
files: badtabs.py
messages: 165303
nosy: jwilk
priority: normal
severity: normal
status: open
title: 2to3 should fix bad indentation (or warn about it)
Added file: http://bugs.python.org/file26365/badtabs.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15332>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to