[New-bugs-announce] [issue24260] TabError behavior doesn't match documentation

Evgeny Kapun report at bugs.python.org
Thu May 21 23:45:51 CEST 2015


New submission from Evgeny Kapun:

In the documentation, it is said:

    Indentation is rejected as inconsistent if a source file mixes tabs and spaces in a way that makes the meaning dependent on the worth of a tab in spaces; a TabError is raised in that case.

But that's not true. For example, Python thinks that these two indentations are "consistent":

<tab><8 spaces>
<8 spaces><tab>

However, their width would be different for any tab width except 1, 2, 4, and 8.

Actually, it's not easy to check that indentation is "consistent" as it is defined currently, so I think that it is the documentation that should be changed. So, I think that the paragraph that I quoted above should be changed to match the actual behavior.

----------
components: Interpreter Core
messages: 243794
nosy: abacabadabacaba
priority: normal
severity: normal
status: open
title: TabError behavior doesn't match documentation
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24260>
_______________________________________


More information about the New-bugs-announce mailing list