Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "Comment with Block comment" is always disabled in PyCharm 1.5.4?

Tags:

pycharm

I have found that the menu Code | "Comment with Block comment" is always disabled.

How to fix it?

like image 416
q0987 Avatar asked Oct 18 '11 16:10

q0987


People also ask

How do you comment a block of code in Pycharm?

To comment a line of code, place the caret at the appropriate line and press Ctrl+/ . Press Ctrl+/ again on the same line to uncomment it. To move a line up or down, press Alt+Shift+Up or Alt+Shift+Down respectively.

How do I comment everything in Pycharm?

Comment out multiple lines in Pycharm If we have to comment out multiple lines of code in Pycharm, we can select the lines to be commented out and then press ctrl+shift+/ . To uncomment the lines, we just have to select the lines and then again press ctrl+shift+/ .

How do you turn a block of code into a comment?

Using #'s to Comment a Block of Code The most straight-forward way to comment out a block of code in Python is to use the # character. Any Python statement that begins with a hashtag will be treated as a comment by the compiler.

How do you comment out a block in Python?

To comment code in Python, write the “#” (octothorpe) at every new code line. It tells the Python compiler to ignore its execution and go to the following line. Comments start with a #, and the Python compiler will ignore its execution. We commented on the code using the # sign in the above example.


1 Answers

Because in Python, there is no such thing as a block comment.

The """ stuff here """ is for documentation.

like image 74
foo Avatar answered Sep 27 '22 22:09

foo