Hacker News new | ask | show | jobs
by aroberge 4864 days ago
WAT?. Python can parse the above very nicely, thank you.

    >>> value = "example # no that's not a comment" # but here's one
    >>> value
    "example # no that's not a comment"
1 comments

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.