At the time I wrote that, the only Python parser was removing the comments by splitting the line on "#", which mean it wouldn't work with the example I mentioned.
It seems there are now several other Python parsers, so some of them are probably getting it right.
It seems there are now several other Python parsers, so some of them are probably getting it right.