Closed as not planned
Closed as not planned
Description
Feature or enhancement
Proposal:
Sometimes another programmer may make the mistake that using "//" or "/**/" to comment, especially cross-language projects.
In my option, showing the message need to satisfy the following comditions:
If the Exception raised by "//":
1: must at the beginning of the line.
2: the last line of the code cannot be end with ""
#SyntaxError(need)
def one_or_two():
// 1 or 2
a = random.randrange(1,3)
return a
#SyntaxError(don't need)
def one_or_two(): // 1 or 2
a = random.randrange(1,3)
return a
#TypeError(don't need)
def one_or_two():
a = random.randrange(1,2)
print(a) // 1 or 2
#Valid
def one_or_two():
a = random.randrange(1,3)
return a // 1 or 2
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response