Python implements code block folding

In python, methods and classes can be folded, but in many cases, a part of the code needs to be folded according to the implemented function.

It can be implemented with the same comment code:

#< editor-fold desc="What to display after folding"'''
  your code
        '''
#< /editor-fold 

Very simple two sentences, but there was a problem the first time I used it, because I had already completed the code, so I wrote these two sentences on the front and back ends respectively, and the result could not be folded...

At first I thought it was a misspelling, and I checked it several times, to no avail.

Finally, after writing these two lines next to each other, cut the code to be folded to the middle, everything is OK...

I think it should be a bug in the IDE. I use PyCharm 2016.3

Supplementary knowledge: Pycharm folding code shortcut keys

Desktop Eclipse shortcut keys

All code folding: ctrl+alt+-
All code expansion: ctrl+alt++
Collapse a certain point: ctrl+-
Expand a layer: ctrl++

postscript:

The above Python implementation code block folding is all the content shared by the editor, I hope to give you a reference.

Recommended Posts

Python implements code block folding
Python implements verification code recognition
Python implements the source code of the snake game
Python implements Super Mario
Python implements tic-tac-toe game
Python implements tic-tac-toe game
Python implements Tetris game
Python implements image stitching
Python implements minesweeper game
Python SMS bombing code
Python implements scanning tools
Python implements threshold regression
Python implements minesweeper games
Python implements electronic dictionary
Python implements guessing game
Python implements simple tank battle
Python implements udp chat window
Python code to find bugs (2)
Python code to find bugs(7)
How to comment python code
Python implements WeChat airplane game
Python implements word guessing game
Python implements a guessing game
Python code to find bugs (3)
Python code to find bugs(9)
Python drawing rose implementation code
Python implements parking management system
Python implements digital bomb game
Python implements TCP file transfer
Python numpy implements rolling case
OpenCV Python implements puzzle games
Python implements simple tic-tac-toe game
Python implements password strength verification
Python implements car management system
Python regular expression example code
Python implements panoramic image stitching
Python install OpenCV sample code
Python code to find bugs(6)
Python implements SMTP mail sending
Python implements multi-dimensional array sorting
How Python implements FTP function
Python implements mean-shift clustering algorithm
Python code to find bugs (1)
Python code to find bugs(8)
Python implements gradient descent method
Python code to find bugs(5)
Python implements text version minesweeper
Is python code case sensitive
Python implements image stitching function
Python implements the brick-and-mortar game
Python telnet login function implementation code
python how to view webpage code
Python implements student performance evaluation system
How Python implements the mail function
Python simply implements the snake game
How to wrap in python code
Python3 implements the singleton design pattern
Python implements exchange rate conversion operations
Python implements string and number splicing
Python implements ten classic sorting algorithms
Python implements a universal web framework