bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42513: Python indentation bug when using multi-line on an if-conditi


From: Lars Ingebrigtsen
Subject: bug#42513: Python indentation bug when using multi-line on an if-condition
Date: Thu, 28 Jan 2021 05:55:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dale Sedivec <dale@codefu.org> writes:

> If I use something other than a comment following the "if" statement
> line, I can reproduce the original behavior in a master build from
> yesterday.  For example, replace "#do something" with "''" (an empty
> string) or just "bar".

Indeed:

def fun(arg):
    if(                                                     
            args.suppliername == "x"):
        foo
    else:
        foo

def fun(arg):
    if(                                                   
            args.suppliername == "Messingschlager" or          
            args.suppliercodename == "MS"
    ):
        foo
else:
    foo

PNG image


> (I am *guessing* the original reporter's code had at least one
> statement in the "if" block.  It's not valid syntax otherwise.)

However, both these examples indent the same for me in Emacs 26.1 and
Emacs 28 (wrong in the same way), so I'm still not seeing what the
original reporter is seeing?

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]