Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53608
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Paul Rudin <paul@rudin.co.uk> |
| Newsgroups | comp.lang.python |
| Subject | Re: how to detect comment in source code file ? |
| Date | Wed, 04 Sep 2013 08:18:23 +0100 |
| Lines | 17 |
| Message-ID | <87a9jtoy0w.fsf@no-fixed-abode.cable.virginmedia.net> (permalink) |
| References | <1fbab13d-bb98-465e-affe-f2fddeec8138@googlegroups.com> <mailman.27.1378278177.5461.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Trace | individual.net G7py0dEnPRbDOrhcfxE+HwDU2hwq2l4Z+/WWFnnCrCpfeY4B6w |
| X-Orig-Path | hal9000.rudin.co.uk!not-for-mail |
| Cancel-Lock | sha1:l8tymGCl3pkYsfhMesd4hPAY5Ms= sha1:5LFsrGR0TfXGiVPusniEUjgSMFE= |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
| Xref | csiph.com comp.lang.python:53608 |
Show key headers only | View raw
Ben Finney <ben+python@benfinney.id.au> writes: > vnkumbhani@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. Although you can use unbound multi-line strings as a kind of comment. But its often better to make the strings into doc strings proper.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to detect comment in source code file ? vnkumbhani@gmail.com - 2013-09-03 23:05 -0700
Re: how to detect comment in source code file ? Ben Finney <ben+python@benfinney.id.au> - 2013-09-04 17:02 +1000
Re: how to detect comment in source code file ? Paul Rudin <paul@rudin.co.uk> - 2013-09-04 08:18 +0100
Re: how to detect comment in source code file ? Steven D'Aprano <steve@pearwood.info> - 2013-09-05 01:56 +0000
Re: how to detect comment in source code file ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-09-04 23:40 -0400
Re: how to detect comment in source code file ? Piet van Oostrum <piet@vanoostrum.org> - 2013-09-05 08:11 -0400
Re: how to detect comment in source code file ? Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2013-09-05 07:33 +0200
csiph-web