• Change the identation base value?

    From scruel tao@21:1/5 to All on Wed Feb 15 07:33:55 2023
    Q3VycmVudGx5LCB3ZSBoYXZlIGZvbGxvd2luZyBQRVA6DQpQRVAgODogRTExNCBpbmRlbnRhdGlv biBpcyBub3QgYSBtdWx0aXBsZSBvZiA0IChjb21tZW50KQ0KDQpIb3dldmVyLCBJIHdvbmRlciBo b3cgbWFueSBwZW9wbGUgYXJlIHVzaW5nIDIgc3BhY2VzIGFzIHRoZWlyIGNvZGUgaW5kZW50YXRp b24gaW4gcHJvamVjdHM/IFNob3VsZCBpdCBiZSBuZXNzZXJhcnkgZm9yIHVzIHRvIGNoYW5nZSB0 aGlzIFBFUCBmcm9tIKGwbXVsdGlwbGUgb2YgNKGxIHRvIKGwbXVsdGlwbGUgb2YgMqGxPw0KDQo=

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Angelico@21:1/5 to scruel tao on Thu Feb 16 04:20:47 2023
    On Thu, 16 Feb 2023 at 04:18, scruel tao <scruelt@hotmail.com> wrote:

    Currently, we have following PEP:
    PEP 8: E114 indentation is not a multiple of 4 (comment)

    However, I wonder how many people are using 2 spaces as their code indentation in projects? Should it be nesserary for us to change this PEP from “multiple of 4” to “multiple of 2”?


    Read PEP 8 itself before making a decision.

    1) It is NOT rules for all Python code, only the standard library.
    2) https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds

    It is not necessary to change the PEP; it is necessary to fix tools
    that claim more authority than they actually have.

    ChrisA

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Cameron Simpson@21:1/5 to Chris Angelico on Thu Feb 16 08:02:46 2023
    On 16Feb2023 04:20, Chris Angelico <rosuav@gmail.com> wrote:
    On Thu, 16 Feb 2023 at 04:18, scruel tao <scruelt@hotmail.com> wrote:
    Currently, we have following PEP:
    PEP 8: E114 indentation is not a multiple of 4 (comment)

    However, I wonder how many people are using 2 spaces as their code indentation in projects? Should it be nesserary for us to change this PEP from “multiple of 4” to “multiple of 2”?

    Read PEP 8 itself before making a decision.

    1) It is NOT rules for all Python code, only the standard library.
    2) https://peps.python.org/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds

    It is not necessary to change the PEP; it is necessary to fix tools
    that claim more authority than they actually have.

    Speaking as a 2-space indenter myself (in my personal code):

    The tool in question is likely `pycodestyle`, whose _default_ linting
    measures PEP8 criteria among other things.

    I run a few different linters (via a script named "lint") and turn off
    quite a few of the `pycodestyle` checks, `E114` included.

    `pycodestyle` doesn't clean any special "authority", and exlicitly
    offers ways to turn off whichever checks you find unsuitable to your
    code.

    Cheers,
    Cameron Simpson <cs@cskk.id.au>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)