From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 0771F3858D28 for ; Mon, 17 Oct 2022 13:06:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0771F3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 065232063C; Mon, 17 Oct 2022 13:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666011968; h=from:from:reply-to: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=5ZMGHO2M69FWcj8x/meEOXEeNVRMdr2XBEIM5XjQgoE=; b=DNKURnWJ2tm4WUPfT/0iOouwZT1iMjUzCHiiohZ1BHfbQQO6syR4koM+E9aXAJKKSCdbmm CvejeHW0MHYsSAQRBpkn0j7AxwdG1jct0ebzNt2kvfR70PeBUP/iJvR+D3MnC3E46AOOe1 n+EN+eCjJtnnoTQJ4Q5YicQ3i9TTOaY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666011968; h=from:from:reply-to: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=5ZMGHO2M69FWcj8x/meEOXEeNVRMdr2XBEIM5XjQgoE=; b=tgyQ/PkZwdaMBv0jtL1vxpUVeBL3lk0wU5Fj1taoUOW74td7nW9j03kHbHtgbt3nDpana8 2qZVvuxyP5Nq3VDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DC2AD13ABE; Mon, 17 Oct 2022 13:06:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KDRHND9TTWPqSQAAMHmgww (envelope-from ); Mon, 17 Oct 2022 13:06:07 +0000 Message-ID: <8ac4ed42-0f7c-c625-a55d-263452cb5250@suse.cz> Date: Mon, 17 Oct 2022 15:06:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [DOCS] Python Language Conventions Content-Language: en-US To: David Malcolm , Gerald Pfeifer Cc: gcc-patches@gcc.gnu.org, Gaius Mulley References: <73efef2e-0a77-529c-73b3-1164480d3a86@pfeifer.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 10/13/22 19:16, David Malcolm wrote: > On Thu, 2022-10-13 at 11:44 +0200, Gerald Pfeifer wrote: >> Hi Martin, >> >> On Thu, 13 Oct 2022, Martin Liška 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. >> >> good initiative, thank you! This makes sense to me, alas I'm not a >> Python >> 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. All right, let me install my initial patch with the improved wording. Cheers, Martin > >> >> >> Some suggestions on the web side of things: >> >>> +
  • Python Language Conventions >> >> Since the name of the page already is codingconventions.html, I >> suggest >> making this simply "#python" - shorter and simpler. :-) >> >>> +Python scripts should follow >> href="https://peps.python.org/pep-0008/">PEP 8 – Style Guide for >>> Python Code >>> +which can be verified by flake8 >>> tool. >> >> ...by the...tool. >> >>> +We do also recommend using the following flake8 plug- >>> ins: >> >> Here maybe simply say "We recommend using"? > > That's a much better wording. > > Dave > >> >> Hope this helps, >> Gerald >