code folding, a unique problem to python?

John Salerno johnjsal at NOSPAMgmail.com
Thu Jun 15 12:03:27 EDT 2006


Specifically, I'm using UltraEdit and perhaps there's no way perfect way 
to implement code folding with it, given how it uses its syntax 
highlighting file to do so (i.e., you have to specify an "Opening" and 
"Closing" character in which to enfold code, such as braces).

But my question is more general: is it possible to implement code 
folding with Python given that it has no real block delimiters? Or is 
this still a matter of which particular editor/IDE you use? For my part 
I've tried (as was suggested elsewhere) to use 'def' as an opening and 
closing keyword, but this of course will enfold everything between two 
defs, even if you have more code between your function definitons (such 
as a new class definition).

So maybe I'm stuck in UE, but I'm curious if there is some general way 
to do this, or is Python just too simple and concise for its own good? :)



More information about the Python-list mailing list