GNU bug report logs - #42513
Python indentation bug when using multi-line on an if-condition

Previous Next

Package: emacs;

Reported by: swedebugia <swedebugia <at> riseup.net>

Date: Fri, 24 Jul 2020 09:41:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: swedebugia <swedebugia <at> riseup.net>
Cc: 42513 <at> debbugs.gnu.org, Dale Sedivec <dale <at> codefu.org>
Subject: bug#42513: Python indentation bug when using multi-line on an if-condition
Date: Wed, 27 Jan 2021 07:47:47 +0100
[Message part 1 (text/plain, inline)]
swedebugia <swedebugia <at> riseup.net> writes:

> The following code indents correctly:
> def fun(arg):
> 	if(                                                     
> args.suppliername == "x"):
> 		#do something
> 	else:
> 		#do something
>
> The following code does not indent correctly:
> def fun(arg):
> 	if(                                                   
> args.suppliername == "Messingschlager" or          
> args.suppliercodename == "MS"
> 	): #<- culprit
> 		#do something
> else: #<- this else is not possible to indent 1 tab
> 		#do something

I tried this in Emacs 26.1 and Emacs 28, and both seem to indent the
same, or am I missing something?

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
Both are wrong, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

This bug report was last modified 4 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.