From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#34268: 27.0.50; wrong indentation in python mode Date: Fri, 24 Sep 2021 00:01:03 +0200 Message-ID: <87pmszuf34.fsf@gnus.org> References: <877df8qnmn.fsf_-_@gnus.org> <8735pvhuf0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Valentin Ignatev , sds@gnu.org, 34268@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 00:02:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTWnI-0007os-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 00:02:16 +0200 Original-Received: from localhost ([::1]:42684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTWnG-0008Ml-IW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 18:02:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTWn4-0008K2-SZ for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 18:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTWn4-0004oU-Jl for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 18:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTWn4-0003HO-Gl for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 18:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Sep 2021 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo confirmed Original-Received: via spool by 34268-submit@debbugs.gnu.org id=B34268.163243447610185 (code B ref 34268); Thu, 23 Sep 2021 22:02:02 +0000 Original-Received: (at 34268) by debbugs.gnu.org; 23 Sep 2021 22:01:16 +0000 Original-Received: from localhost ([127.0.0.1]:56158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTWmK-0002dy-0V for submit@debbugs.gnu.org; Thu, 23 Sep 2021 18:01:16 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTWmI-0002Yf-Jg for 34268@debbugs.gnu.org; Thu, 23 Sep 2021 18:01:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Nel8TNFZAhjftSek45XVuudWLPURy+NZ5UtGXKcOicE=; b=NDaDaU5cCPy2Y0GXeYvPHMURBn tA+9rTODiPlw1ddBIiXolCUcxAJH7DWYinIu0u3+BPTmq69EaKtc2fL3UyPKzZ6ov1EHuNeODI+fR HBZhmbjt/Yp9B1aYO4ZaBDHtNxzQjWeg22dRDIUhQtoSHMOjeBACwN43NJUbDsq/GQGM=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTWm7-0007fh-T5; Fri, 24 Sep 2021 00:01:07 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEW4oGLo4LhfSi7/ ///dCHUJAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UJFxU6NFRzZpEAAAGzSURBVCjPNdDBitswEAbg UYgX45OzSEvZUzaUYusp7GBD6pMVNKHklJQutHmKpCSXnFrILqUnOySgzFN2pO765I/5NRoNiCJJ E4GrB4UIsZmeUkR7QgbE0z2UxkpfEX+q3Wdt7IvCGoocYaY5V3NlnA9d4xAXgrHWWp9chGbEyMa0 eaUDtr6bnjg6d3zGYwPF8fLCf77BantPJf7/wAxkkr6jLOJp6i/BygJ7CZCzrAXpETsVukmTzkHT QfnKKi1sP6Abx+5Ao7Hiq0d1hka1Mv6urxUuhjCzrXzUug+xFm3UZh44BKvm/QCSK4MvrdsM+uWF kfIEuIGnpjM+xpjtnpveYORjXF433V4JFRD/aIgOM+VjOHUDcuIbAhostcuIRD3ylTKjPKGJEh42 pz4hWT+HM2u6JMdtXYLfWPXYpUS/uQHOVX13vic6+YUUI/z48+i09LBKtoO/7tjX4UzdxgfaPrWM xesau+utHIeYvJp558rMA9UIC/pQxGHQqMCZ3lXbyGP4gMvzrerCBKrBLx7SV34V2J6dFQGWl64z CXVAhJbyFCA8gTGh/Rt4xZ90lIp/x1KvKUgs+CYAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDkt MjNUMjE6NTg6NTIrMDA6MDC5BFUJAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA5LTIzVDIxOjU4 OjUyKzAwOjAwyFnttQAAAABJRU5ErkJggg== X-Now-Playing: Mike Rutherford's _Smallcreep's Day_: "Romani" In-Reply-To: <8735pvhuf0.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 23 Sep 2021 23:08:19 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215245 Archived-At: Augusto Stoffel writes: > I have no idea about what strong opinions other people may have here, > but after looking a bit into this I think 1 is probably a better default > for `python-indent-def-block-scale'. Here's what I found out: > > The current default of 2 for `python-indent-def-block-scale' is meant to > produce this indentation style > > ``` > def long_function_name( > var_one, var_two, var_three, > var_four): > print(var_one) > ``` > > which is exactly as one can find in PEP-8. Setting it to 1 produces > > ``` > def long_function_name( > var_one, var_two, var_three, > var_four): > print(var_one) > ``` > > which is deemed wrong in that document. So it sounds like we need a different solution than just altering block-scale, because it'd be nice if that continued to work, even if: > However, the above formatting looks quite unfamiliar to me anyway. I > usually see one of the following styles: > > ``` > # By far the most common style in the Python source, and, I, think, the > # default style of YAPF > def long_function_name(var_one, var_two, var_three, > var_four): > print(var_one) > ``` Yeah, that looks more normal. > Finally, the situation mentioned originally in this bug report seems to > be a glitch: an indentation rule that makes sense in a "for" statement > is being applied where a "for" appears in a list comprehension. It's a > rather minor detail, I'd say. Right. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no