Why does PyCharm fold newline comments at the end of a nested code block into the previous block?
Example (try folding the first "if" block):
def print_me(a):
# newline comment
if a == 'me':
dummy_padding = ''
if not dummy_padding:
favorite_place = 'zoo'
print(a)
else:
pass
# invisible newline comment
elif a == 'you':
dummy_padding = ''
pass
# visible newline comment
elif a == 'us':
dummy_padding = ''
if not dummy_padding:
favorite_place = 'movies'
print(favorite_place)
# visible indented comment
elif a == 'them':
dummy_padding = ''
pass
return a
Is there a spec in Python that states that comments inside a function should always be indented? If not, is there some way to adjust settings in PyCharm so that it doesn't disappear newline comments when it folds nested code?