Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!feeder2-2.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'syntax': 0.04; 'processing.': 0.07; 'remaining': 0.07; 'pgp': 0.09; 'cc:addr :python-list': 0.11; 'language.': 0.14; 'pairs': 0.16; 'quoted': 0.16; "where's": 0.16; 'wrote:': 0.18; 'wed,': 0.18; '(the': 0.22; '>>>': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'interpret': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'respective': 0.29; 'tim': 0.29; 'important.': 0.30; 'languages': 0.32; 'run': 0.32; 'text': 0.33; 'not.': 0.33; 'but': 0.35; 'instances': 0.36; 'marks': 0.36; 'doing': 0.36; 'should': 0.36; 'two': 0.37; 'nov': 0.38; 'pm,': 0.38; 'quote': 0.39; 'most': 0.60; 'new': 0.61; 'simply': 0.61; 'happen': 0.63; 'to:addr:gmail.com': 0.65; 'effectively': 0.66; '26,': 0.68; 'imagine': 0.93; 'quotation': 0.93; 'wait,': 0.93 Date: Wed, 26 Nov 2014 00:00:39 -0600 From: Tim Daneliuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Newsgroups: comp.lang.python To: Chris Angelico Subject: Re: Quotation Ugliness References: <54752A7C.2060800@tundraware.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (ozzie.tundraware.com [75.145.138.73]); Wed, 26 Nov 2014 00:00:39 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: sAQ60dbe060772 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: "python-list@python.org" 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: , Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416981654 news.xs4all.nl 2945 [2001:888:2000:d::a6]:52496 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81542 On 11/25/2014 07:32 PM, Chris Angelico wrote: > On Wed, Nov 26, 2014 at 12:18 PM, Tim Daneliuk wrote: >>> And what should happen with mismatched quotes? >>> >>> do("th/*is", "and", "th*/at") >> >> >> Match pairs as usual, and let the remaining unterminated quote run on. > > Wait, what? Where's an unterminated quote? I can imagine two ways of > reading this: one the way most programming languages would interpret > it (the /* and */ are both simply part of their respective strings, > and have no significance), and the "anything nests in anything" way, > in which the quotation marks inside /* */ are effectively inverted; > neither of those leaves an unterminated quote. > > ChrisA > But I am not designing a new programming language. I am doing straight up text processing. I want to know all the instances of S when it is quoted or not. In my particular application, recovering from a failure of syntax like this isn't important. -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/