Make :: function as a comment

Question:

Pretty simple question, i’d like for :: to work as remark

print("Hello") #This prints Hello
print("hello") ::This prints hello
#This is a remark/comment
::This should also be a remark

is there any function that allows me to assign :: to work as #

Asked By: Remi

||

Answers:

You cannot redefine language constructs in python (or any other language).

You might be able to if you downloaded the python source code and recompiled a version without comment support or something – but that’s probably out of the scope of what you are trying to achieve (and would require that version of python to run, so it wouldn’t be portable).

Answered By: Flow
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.