Only in the Mako template itself is ##
a comment. You can still use variables (e.g., ${x}
) that are strings that contain hash characters without worrying they'll be interpreted as comments.
According to Mako Syntax:
Above, the string representation of x is applied to the template’s output stream.
The variable is sent directly to the output.
It's the same concept of having hash characters in a Python string. For example:
s = "#This would be a Python comment"
print(s) # returns "#This would be a Python comment"