[rescue] Python > 3.6 on Solaris 10
Joshua Boyd
jdboyd at jdboyd.net
Mon Oct 18 17:17:32 CDT 2021
On 10/18/21 7:36 AM, Liam Proven wrote:
> One of my colleagues has switched from Emacs to VS Code and has
> become quite the evangelist for it. His indentation is OK, but he
> doesn't line wrap at all any more and so new lines can be hundreds of
> characters long. I don't know what VS Code does for him but he can't
> see it -- I presume it's soft-wrapping it and not showing him the
> difference, making it impossible for him to tell.
>
> I mostly work directly in Github and it breaks it very badly.
> Invisible scrollbars far off the top or bottom of the window and
> broken inconsistent keystrokes. I have to make edits to his source to
> hard-wrap it just to read the wretched stuff.
>
> Another colleague, the woman I was hired to cover for when she was on
> maternity leave, just ignores indentation completely. Most of her code
> is just flat against the left margin and when there is indentation it
> is 100% totally random. She doesn't seem to even see it. Reading her
> edits is a nightmare.
Ugh. That sounds like a place that needs to pick a standard (any
standard) and start enforcing it with clang-format.
>> I see that you're firmly in Team Python :)
> Not really! Python has been bouncing off my brain hard since v1.x was
> current and while I can kinda read it, I can't write it usefully. Keep
> meaning to try again.
>
> But while there's a huge amount of noise pro and con syntactic
> whitespace, the simple argument that it _forces_ disparate groups of
> programmers to _all indent the same way_ is rarely mentioned.
>
> Many love it, many hate it, a few are ambivalent, but few mention this
> big win: each coder _can't_ just pick their own preferred style.
> That's a big deal ISTM. I totally get the arguments about code
> breaking if you render it in HTML and the difficulties of cut and
> paste and so on, but it pours oil on the waters of indentation
> preferences. That's important.
>
> It seems that it leaves people one choice: spaces, tabs, how many of
> them, and mixtures of both. :-D
Mixing tabs and spaces is considered a big no-no in the python world.B
Using pure tabs is allowed, but the official standard is spaces only
(documented in PEP8).B Since Python 3, mixing tabs and spaces went from
discouraged to a compile error.
>> The other way is to mandate that all code be run through a source-tidying
>> tool to ensure consistency. This can be enforced via the version control
>> system, although peer pressure is often sufficient.
> Well true. But that too has issues as I have discovered with XML:
> reformat the source with another tool and you get huge diffs, and the
> changes the human made are lost in the noise of the massive
> every-bloody-line change that the formatting tool made.
I try to make reformatting and the actual changes separate commits.B
That doesn't help diffs between branches or tags, nor does it help diffs
across several revisions, but at least when going through diff by diff
it highlights the substance from the style.
More information about the rescue
mailing list