Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'interpreter': 0.05; 'nested': 0.07; 'subject:code': 0.07; 'subject:file': 0.07; 'string': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '(something': 0.16; 'message-id:@4ax.com': 0.16; 'pairs).': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:comment': 0.16; 'subject: ?': 0.16; 'url:home': 0.24; 'header:X-Complaints-To:1': 0.27; 'character': 0.29; 'comments': 0.31; 'sep': 0.31; 'comment': 0.34; 'charset:us- ascii': 0.36; 'possible': 0.36; 'received:76': 0.38; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'email addr:gmail.com': 0.63; 'subject:source': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: how to detect comment in source code file ? Date: Wed, 04 Sep 2013 23:40:57 -0400 Organization: IISS Elusive Unicorn References: <1fbab13d-bb98-465e-affe-f2fddeec8138@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-18-180.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378352705 news.xs4all.nl 15949 [2001:888:2000:d::a6]:39845 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53667 On Tue, 3 Sep 2013 23:05:57 -0700 (PDT), vnkumbhani@gmail.com declaimed the following: >how works python interpreter for finding comment ? >if possible find nested comment ? Python does not have "nested comment". Comments begin at any # character that is not inside a string (something inside ' or " pairs). -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/