how to detect comment in source code file ?
Ben Finney
ben+python at benfinney.id.au
Wed Sep 4 03:02:42 EDT 2013
vnkumbhani at gmail.com writes:
> how works python interpreter for finding comment ?
It works as specified in the language reference. In particular, see
<URL:http://docs.python.org/3/reference/lexical_analysis.html#comments>.
> if possible find nested comment ?
Python's comments are line-end comments only. The syntax does not allow
multi-line nor nested comments.
--
\ “If you go flying back through time and you see somebody else |
`\ flying forward into the future, it's probably best to avoid eye |
_o__) contact.” —Jack Handey |
Ben Finney
More information about the Python-list
mailing list