Tuesday, June 07, 2022

Re: mg: how to indent using spaces instead of tabs

> On Jun 5, 2022, at 4:24 AM, Sam Lee <samlee746@yahoo.com> wrote:
>
> On 2022-06-05 10:58 +0200, Omar Polo wrote:
>> M-x no-tab-mode RET seems to work (as long as you don't want to change
>> the width of the `expandtab'; it always align to the nearest multiple
>> of 8)
>
> How do people write Python programs using mg?
> Python requires 4 space indentation ...

I have to say it...
Technically Python _requires_ any white space indentation, but the PEP 8 readability guidelines recommend sticking to four spaces. Google sticks to two spaces. I write prototype code in two spaces and code I intend to re-read at some point with four spaces (the "serious" stuff.) Some people use tabs, but they use tabs throughout. Mixing tabbed and spaced indenting is horrific in an indent specified language.

No comments:

Post a Comment