On 11/29/2020 2:16 AM, George Neuner wrote:
> On Sat, 28 Nov 2020 00:47:00 -0700, Don Y
> <blocked...@foo.invalid> wrote:
>
>> On 11/27/2020 5:40 AM, Wojciech Zabolotny wrote:
>>
>>> Here you are:
https://groups.google.com/g/alt.sources/c/YeeAV3fBAVc/m/AZgPoFxS4NYJ
>>> The Python code has completely removed indentation.
>>
>> Indentation and whitespace /tend/ to be insignificant to the operation
>> of the code. Of course, presence in string literals is a different
>> story -- where even replacing tabs with spaces is a hazard.
>
> In Python, indentation is required syntax: in general, it is an error
> for code in the same scope not to be vertically aligned.
Sorry, I didn't even examine the "content" of the archive; rather,
concentrated on the "SHAR wrapper" as it was quite obviously
corrupted.
> However, with a nested 'if-else', logic actually depends on the
> indentation:
>
> if <expr1>:
> <statements1>
> if <expr2>:
> <statements2>
> else:
>
> is very different from
>
> if <expr1>:
> <statements1>
> if <expr2>:
> <statements2>
> else:
>
> In C the 'else' goes to the nearest 'if' regardless of whitespace. In
> Python, the 'else' goes to the nearest 'if' with which it vertically
> aligned.
Yes. I dislike Python as my naming and coding styles rely on long
logical lines. I prefer to let a pretty-printer clean up my
code to my own coding standards (indents, braces, function templates,
etc.) than to let the language dictate what my code HAS TO look like.
[I most often don't write in an IDE so can't rely on the "editor"
to "correct" formatting for me if, for example, I prepend an "if"
to a block of code or wrap it into some other explicit block]
> Significant whitespace sucks!
There are still places where a space is not a space and you have to
deal with it. I frequently find tabs and spaces interchanged for
each other when cutting and pasting across systems; the machine
sees things that the human doesn't care about. Try CONCLUSIVELY
sorting out whether you're looking at " \t", " " or "\t " (or
variations thereof) from a paper printout!
But, there are also annoyances with things as banal as typefaces
that needlessly confound.
Or, displays that have opted to use particular glyphs that
can't readily be resolved as being rightside up or upside
down. Is "529" five hundred and twenty nine? Or, six hundred
and twenty five?