-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Description
Feature or enhancement
Proposal:
Currently: Python does this
class A:
def B():
print("Whatever")
When we comment out class A:
(line 1), executing it will cause an indentation error (at line 2)
But if we want to comment out a whole class / def / with block, we have to manually comment out EVERY LINE.
Hence, i propose that:
When we comments out the first line of class / def / with block, Python interpreter auto-ignores the blocks in it.
So:
class A:
# Do something
# class B:
def func(a):
print(a)
In the code above, python auto ignores the B class. This could be useful for a big function that errors out but we don't know which line is the problem (and its hard to debug)
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
No labels