Closed massibronto closed 8 months ago
Python doesn't have block comments; what you're using is a string, which happens to work something like a block comment because it's ignored at runtime. The warning you cite is raised in strings and is correct.
Thank you for pointing this out. Sorry for this misconception; I am not so familiar with the language yet.
Please direct questions, including about possible bugs, to a help forum such as https://discuss.python.org/c/users/7
Bug report
Bug description:
The issue happens when having escape characters inside block comments. The block comment will break on the character sequence \A and \x and \d. Error messages:
blockcomment.py:4: SyntaxWarning: invalid escape sequence '\A'
orblockcomment.py:4: SyntaxWarning: invalid escape sequence '\d'
orWhereas the block comment will not break on \f or \t
I would expect the block comment to completely ignore the inside, or am I wrong?
CPython versions tested on:
3.12
Operating systems tested on:
Windows