Menu

#514 Folding of comments after functions based on indentation

open
nobody
5
2011-02-05
2011-02-05
Anonymous
No

Now all comments after the function are collapsed together with the function.
So if you have something like this:

class C:
def __init__(self):
pass
# section A
def a1(self):
pass
def a2(self):
pass
# section B
def b1(self):
pass
def b2(self):
pass

after collapse it will look like single mess:

class C:
def __init__(self):...
def a1(self):...
def a2(self):...
def b1(self):...
def b2(self):...

which will make it muck harder to find needed function (and whole point of code folding is to make it more readable, not other way around).
What I would expect from folding is following (same how it's in c++ or Java):

class C:
def __init__(self):...
# section A
def a1(self):...
def a2(self):...
# section B
def b1(self):...
def b2(self):...

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.