[New-bugs-announce] [issue35957] Indentation explanation is unclear

Jérôme LAURENS report at bugs.python.org
Sun Feb 10 12:26:57 EST 2019


New submission from Jérôme LAURENS <jerome.laurens.dev at gmail.com>:

https://docs.python.org/3/reference/lexical_analysis.html#indentation reads

Point 1:
"Tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight"

and in the next paragraph

Point 2:
"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"

In point 1, each tab has definitely a unique space counterpart, in point 2, tabs may have different space counterpart, which one is reliable ?

The documentation should state that Point 1 concerns cPython, or at least indicate that the 8 may depend on the implementation, which then gives sense to point 2.

----------
assignee: docs at python
components: Documentation
messages: 335165
nosy: Jérôme LAURENS, docs at python
priority: normal
severity: normal
status: open
title: Indentation explanation is unclear
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35957>
_______________________________________


More information about the New-bugs-announce mailing list