Open rohan-paul opened 2 years ago
It looks like this is no longer maintained and it can only handle 1 type of line and block comment.
There is an alternative extensions that removes comments and it should work for .py
files: Remove Comments
It looks like this is no longer maintained and it can only handle 1 type of line and block comment.
There is an alternative extensions that removes comments and it should work for
.py
files: Remove Comments
Thanks for the suggestion, and I installed that one, however, even that one seems not to work as expected.
e.g. I have the following python code in .py file. And I just could not delete the multi-line comments using that extension.
def weights_init_normal(m):
"""
In the example above, we've described the input image in terms of its latent attributes using a single value to describe each attribute.
"""
classname = m.__class__.__name__
if classname.find("Conv") != -1:
torch.nn.init.normal_(m.weight.data, 0.0, 0.02)
elif classname.find("BatchNorm2d") != -1:
torch.nn.init.normal_(m.weight.data, 1.0, 0.02)
torch.nn.init.constant_(m.bias.data, 0.0)
@rohan-paul Because it is not a comment, it is a documentation string, use the #
character if you write comments
Python does not have Multi Line comments, """
and '''
are multi line strings