From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AAB813858C55 for ; Thu, 13 Oct 2022 17:16:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AAB813858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665681378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YyqQDyJySSAkZYUEEiyMByPyp+cA2EMBOkdjko9n23Y=; b=ZETxowOGIlHw5LVZuDc04dJJaAjapj8HEZtm79dpYvbUSiLpDH7FOduP3ukSd6heb/GKBl VzhlqRV/M8GSosLaFGodsbJMgS166lFwd6IIGmLFXE4ttrsenw23TI6AWzBWuKcJgp22IX wOlxBoJGzH2O6mdcr9FVFgjgRZnWD0A= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-D5jOMXs3MzeZRS2KZAzKbA-1; Thu, 13 Oct 2022 13:16:17 -0400 X-MC-Unique: D5jOMXs3MzeZRS2KZAzKbA-1 Received: by mail-qv1-f72.google.com with SMTP id y2-20020a0ce802000000b004b1ce1c4a70so1927588qvn.9 for ; Thu, 13 Oct 2022 10:16:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YyqQDyJySSAkZYUEEiyMByPyp+cA2EMBOkdjko9n23Y=; b=Kpswxk+Uvd0GuHM4rJz5JlpPBWZrLZLjHc5wQ3E0hilyKRvaB1e/ELWbsmFgpddI+k cfzzBzkIHkqgsZncai/+eop9NuaEyOAOVTPlR85pujk9nVSFjrth/CaMJ4TiDRGmfACz jELWXINP2dgbQLIwoeYmzOXJaTO8LQefhfzvBgDUNytz5WD6kDD7a5kLQjNP/UE5OvUy Jfc+YBu9h23OB6Fgu1e8uhd0j0Iq5tws4vAfrnUdNnDEBc9pjRVVyjyrCzVIHvpLFy9j 7wnV9LmBj5h/NsrqAQUnUOgTjBSq65k9ygQtV2zpJqh1rvruypj++rRXZN0vXJBG09HB 9k2A== X-Gm-Message-State: ACrzQf3iOUQS74kRE89V83o4syxXpe7Hygb9k4jZESqdN2CG6vp8OKLc lIIkDuaSEEsfSbt4dEMXVbI16WpXEJ3La8p4AEoC5JFrr/Cmhwdfx5+Ot1tONmLq10La99oJZ4w xyHwj9iYGwucWFsYO4g== X-Received: by 2002:a05:622a:4d1:b0:39c:beaa:411e with SMTP id q17-20020a05622a04d100b0039cbeaa411emr743016qtx.530.1665681376815; Thu, 13 Oct 2022 10:16:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6y/CBc1ELoPqRfEmf1miwY2DSr/yjTYJbUE1dqpxWA8NaRF2khC0fcfs+/kvpr3Apu3rV41A== X-Received: by 2002:a05:622a:4d1:b0:39c:beaa:411e with SMTP id q17-20020a05622a04d100b0039cbeaa411emr742994qtx.530.1665681376583; Thu, 13 Oct 2022 10:16:16 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id bn39-20020a05620a2ae700b006ee77f1ecc3sm212139qkb.31.2022.10.13.10.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 10:16:15 -0700 (PDT) Message-ID: Subject: Re: [DOCS] Python Language Conventions From: David Malcolm To: Gerald Pfeifer , Martin =?UTF-8?Q?Li=C5=A1ka?= Cc: gcc-patches@gcc.gnu.org, Gaius Mulley Date: Thu, 13 Oct 2022 13:16:15 -0400 In-Reply-To: <73efef2e-0a77-529c-73b3-1164480d3a86@pfeifer.com> References: <73efef2e-0a77-529c-73b3-1164480d3a86@pfeifer.com> User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2022-10-13 at 11:44 +0200, Gerald Pfeifer wrote: > Hi Martin, >=20 > On Thu, 13 Oct 2022, Martin Li=C5=A1ka wrote: > > I think we should add how Python scripts should be formatted. I > > noticed > > that while reading the Modula-2 patchset where it follows the C/C++ > > style > > when it comes to Python files. >=20 > good initiative, thank you! This makes sense to me, alas I'm not a > Python=20 > hacker, so best wait to see what David and Gaius think, too? I'm very much +1 on recommending PEP 8. My Python skills are bit-rotting somewhat, and I've not used flake8, but it seems a reasonable recommendation to me. >=20 >=20 > Some suggestions on the web side of things: >=20 > > +
  • Python Language Conventions >=20 > Since the name of the page already is codingconventions.html, I > suggest > making this simply "#python" - shorter and simpler. :-) >=20 > > +Python scripts should follow > href=3D"https://peps.python.org/pep-0008/">PEP 8 =E2=80=93 Style Guide = for > > Python Code > > +which can be verified by flake8 > > tool. >=20 > ...by the...tool. >=20 > > +We do also recommend using the following flake8 plug- > > ins: >=20 > Here maybe simply say "We recommend using"? That's a much better wording. Dave >=20 > Hope this helps, > Gerald