Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18054

Re: Possible bug in string handling (with kludgy work-around)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:bug': 0.04; 'python': 0.08; 'backslash': 0.09; 'confuse': 0.09; 'newline': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:string': 0.09; 'am,': 0.12; 'bieber': 0.16; 'delimiters': 0.16; 'literals': 0.16; 'markup.': 0.16; 'span': 0.16; 'subject:handling': 0.16; 'superfluous': 0.16; 'wrote:': 0.18; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'literal': 0.23; 'topic.': 0.23; 'string': 0.24; 'code': 0.25; 'specifically': 0.27; 'lee': 0.28; '27,': 0.29; 'problem': 0.29; 'lines': 0.30; 'ok,': 0.31; 'header:User-Agent:1': 0.33; 'header:X-Complaints- To:1': 0.33; 'to:addr:python-list': 0.34; 'someone': 0.34; 'question,': 0.34; 'subject:work': 0.34; 'received:au': 0.36; 'subject:with': 0.36; 'two': 0.37; 'but': 0.37; 'using': 0.38; 'too,': 0.38; 'received:org': 0.38; 'created': 0.38; 'should': 0.39; 'johnson': 0.39; 'why': 0.39; 'subject: (': 0.40; "it's": 0.40; 'to:addr:python.org': 0.40; 'double': 0.61; 'miss': 0.62; 'here': 0.65; 'multi': 0.67; 'amazing': 0.68; 'note:': 0.69; 'become': 0.69; 'dennis': 0.73; 'subject:Possible': 0.84; '-->': 0.91; 'received:110': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Lie Ryan <lie.1296@gmail.com>
Subject Re: Possible bug in string handling (with kludgy work-around)
Date Wed, 28 Dec 2011 08:23:02 +1100
References <mailman.4112.1324938867.27778.python-list@python.org> <4ef91afb$0$29973$c3e8da3$5496439d@news.astraweb.com> <mailman.4133.1324997611.27778.python-list@python.org> <cce5eb97-8e7f-48c6-8f0d-ec6442871196@k28g2000yqn.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 110-175-240-90.static.tpgi.com.au
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
In-Reply-To <cce5eb97-8e7f-48c6-8f0d-ec6442871196@k28g2000yqn.googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4152.1325021001.27778.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1325021001 news.xs4all.nl 6898 [2001:888:2000:d::a6]:39327
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:18054

Show key headers only | View raw


On 12/28/2011 05:04 AM, Rick Johnson wrote:
> --
> Note: superfluous indention removed for clarity!
> --
>
> On Dec 27, 8:53 am, Dennis Lee Bieber<wlfr...@ix.netcom.com>  wrote:
>> You can get by without the backslash in this situation too, by using
>> triple quoting:
>
> I would not do that because:
> 1. Because Python already has TWO string literal delimiters (' and ")
> 2. Because triple quote string literals are SPECIFICALLY created to
> solve the "multi-line issue"
> 3. Because you can confuse the hell out of someone who is reading
> Python code and they may miss the true purpose of triple quotes in
> Python
>
> But this brings up a very important topic. Why do we even need triple
> quote string literals to span multiple lines? Good question, and one i
> have never really mused on until now. It's amazing how much BS we just
> accept blindly! WE DON'T NEED TRIPLE QUOTE STRINGS! What we need is
> single quote strings that span multiple lines and triple quotes then
> become superfluous! For the problem of embedding quotes in string
> literals, we should be using markup. A SIMPLISTIC MARKUP!
>
> " This is a multi line
> string with a single quote -->  <SQ>
> and a double quote -->  <DQ>. Here is an
> embedded newline -->  <NL>. And a backspace<BS>.
>
> Now we can dispense with all the BS!
> "

Ok, you're trolling.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Possible bug in string handling (with kludgy work-around) Charles Hixson <charleshixsn@earthlink.net> - 2011-12-26 14:23 -0800
  Re: Possible bug in string handling (with kludgy work-around) Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-26 14:48 -0800
    Re: Possible bug in string handling (with kludgy work-around) Chris Angelico <rosuav@gmail.com> - 2011-12-27 10:05 +1100
  Re: Possible bug in string handling (with kludgy work-around) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-27 01:10 +0000
    Re: Possible bug in string handling (with kludgy work-around) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-12-27 09:53 -0500
      Re: Possible bug in string handling (with kludgy work-around) Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 10:04 -0800
        Re: Possible bug in string handling (with kludgy work-around) Lie Ryan <lie.1296@gmail.com> - 2011-12-28 08:23 +1100
        Re: Possible bug in string handling (with kludgy work-around) Terry Reedy <tjreedy@udel.edu> - 2011-12-27 16:38 -0500
          Re: Possible bug in string handling (with kludgy work-around) Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 16:57 -0800
            Re: Possible bug in string handling (with kludgy work-around) Lie Ryan <lie.1296@gmail.com> - 2011-12-29 04:54 +1100
        Re: Possible bug in string handling (with kludgy work-around) Terry Reedy <tjreedy@udel.edu> - 2011-12-27 16:38 -0500

csiph-web