Use of a variable in parent loop

Stephane Tougard stephane at sdf.org
Sun Sep 27 22:53:11 EDT 2020


On 2020-09-27, Chris Angelico <rosuav at gmail.com> wrote:
> Or maybe Emacs *isn't* breaking it, and it's just an autoindentation
> thing. I don't know.

>From the discussion I read about this feature, it considers that 'pass' is
use to write an empty def()

def();
	pass

So it's logic for it to indent one level up after a 'pass' because the people
who made it did not see any other usage to 'pass' than that.

if True:
	pass
	print("It's true")

The 'pass' is totally useless by itself, it can be replaced by a comment.


More information about the Python-list mailing list