Sujet : Re: Python (was Re: I did not inhale)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 23. Aug 2024, 10:29:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va9h9k$rlrn$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
User-Agent : Pan/0.159 (Vovchansk; )
On Fri, 23 Aug 2024 09:19:06 +0200, David Brown wrote:
On 23/08/2024 02:19, Lawrence D'Oliveiro wrote:
>
On Thu, 22 Aug 2024 12:47:16 +0200, David Brown wrote:
But it is quite happy with
mixtures of tabs and spaces as long as the result after tab-to-space
conversion is consistent with Python syntax.
Mixtures of tabs and spaces are accepted without complaint.
I understood you to mean that different mixtures of tabs and spaces would
work, so long as they were equivalent to the same indentation under the 8-
spaces = 1 tab rule that you cited.
In fact there is no such equivalence rule. Tabs are tabs, and spaces are
spaces, and never the twain shall be interconvertible.
(The incompatibilities between Python 2 and Python 3 are another pain in
Python.
The fundamental problem was that Unicode was a mess in Python 2 that
needed to be cleaned up. Since they had no choice but to break backward
compatibility in that regard, they figured they would fix a few other
things while they were at it.