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


Groups > comp.lang.python > #61265

Re: Is It Bug?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'skip:\\ 20': 0.07; 'lawrence': 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; 'language.': 0.14; "'\\\\'": 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'working.': 0.19; 'header:User-Agent:1': 0.23; 'interpret': 0.24; 'replace': 0.24; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; '???': 0.30; 'code': 0.31; '>>>>': 0.31; 'but': 0.35; 'method': 0.36; 'subject:?': 0.36; 'so,': 0.37; 'skip:- 20': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'our': 0.64; 'received:89': 0.85
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Is It Bug?
Date Sun, 08 Dec 2013 01:06:45 +0000
References <27c0b454-62e9-410f-b05c-7c5fe306f8aa@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 host-89-240-161-231.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
In-Reply-To <27c0b454-62e9-410f-b05c-7c5fe306f8aa@googlegroups.com>
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.3714.1386464822.18130.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386464822 news.xs4all.nl 2855 [2001:888:2000:d::a6]:52492
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61265

Show key headers only | View raw


On 08/12/2013 00:59, Mahan Marwat wrote:
> Why this is not working.
>
>>>> 'Hello, \\\\World'.replace('\\', '\\')

Whoops a daisy!!! --------------^^^^--^^^^ ???

>
> To me, Python will interpret '\\\\' to '\\'. And the replace method will replace '\\' with '\'. So, the result will be 'Hello, \World'. But it's give me 'Hello, \\\\World'.
>
> The result I want form the code is 'Hello, \World'.
>


-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

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