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


Groups > comp.lang.python > #61281

Re: Is It Bug?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <kwpolska@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.063
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'utf-8': 0.07; 'string': 0.09; 'literal': 0.09; 'cc:addr:python-list': 0.11; 'roy': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'easier': 0.31; '"",': 0.31; 'file': 0.32; 'regular': 0.32; 'raw': 0.33; 'sense': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'skip:u 10': 0.60; 'read': 0.60; 'from:charset:utf-8': 0.61; 'skip:\xe2 10': 0.65; 'smith': 0.68; '8bit%:43': 0.74; 'url:tk': 0.95; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xiAXEWs8zw9idvTEson3Bn07M2wU/WAXsQ/8ZAJf/90=; b=JRrwEvXuwQz6AzpbrK19goh6/6/gUGnMypLXT2VJVzJJLbjXeQ68twXZ9ivYmHmL+N PKXIqADsMllVHkLrzCjGoZsd8yvnyiKddnH6UozIDjd+rCoAySFq10ApuMP5KeMcZnve MuQcFg0OXrgGLOqljRFVsJIxHu3Z0AXqpHwxFDXZUkcd4komNA4sl+h1mRb1yCUBwC1Q ZXAz1nJHB4A+waOwoLvQE4n/EY4FezCM3qvlPxpln/GpUULBfuMPmuvyqFwoNr9jRXtM kev2B/zV9eY1npskXpuYH7icuDWdPl84qF2WhJ+UrByyO1yLVpgwIv5IyD6/JVcta3ym CSYg==
MIME-Version 1.0
X-Received by 10.42.133.199 with SMTP id i7mr821221ict.64.1386496907559; Sun, 08 Dec 2013 02:01:47 -0800 (PST)
In-Reply-To <roy-756493.20224107122013@news.panix.com>
References <27c0b454-62e9-410f-b05c-7c5fe306f8aa@googlegroups.com> <mailman.3713.1386464744.18130.python-list@python.org> <roy-756493.20224107122013@news.panix.com>
Date Sun, 8 Dec 2013 11:01:47 +0100
Subject Re: Is It Bug?
From Chris “Kwpolska” Warrick <kwpolska@gmail.com>
To Roy Smith <roy@panix.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
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 <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3720.1386496916.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386496916 news.xs4all.nl 2858 [2001:888:2000:d::a6]:50199
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61281

Show key headers only | View raw


On Sun, Dec 8, 2013 at 2:22 AM, Roy Smith <roy@panix.com> wrote:
> There's nothing you can do with raw strings that you can't do with
> regular strings, but they're easier to read when you start to use
> backslashes.

Unfortunately, there is one.  A raw string cannot end with a backslash.

>>> r'a\a'
'a\\a'
>>> r'a\'
  File "<stdin>", line 1
    r'a\'
        ^
SyntaxError: EOL while scanning string literal
>>> r'\'
  File "<stdin>", line 1
    r'\'
       ^
SyntaxError: EOL while scanning string literal

-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

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


Thread

Is It Bug? Mahan Marwat <mahanmarwat@gmail.com> - 2013-12-07 16:59 -0800
  Re: Is It Bug? Chris Angelico <rosuav@gmail.com> - 2013-12-08 12:05 +1100
    Re: Is It Bug? Roy Smith <roy@panix.com> - 2013-12-07 20:22 -0500
      Re: Is It Bug? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-12-08 11:01 +0100
      Re: Is It Bug? Chris Angelico <rosuav@gmail.com> - 2013-12-08 21:04 +1100
      Re: Is It Bug? Chris Angelico <rosuav@gmail.com> - 2013-12-08 21:26 +1100
  Re: Is It Bug? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-08 01:06 +0000
  Re: Is It Bug? MRAB <python@mrabarnett.plus.com> - 2013-12-08 01:12 +0000
  Re: Is It Bug? Tim Roberts <timr@probo.com> - 2013-12-07 22:53 -0800
  Re: Is It Bug? Peter Otten <__peter__@web.de> - 2013-12-08 11:43 +0100

csiph-web