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


Groups > comp.lang.python > #86357

Re: strip bug?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.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.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'argument': 0.05; 'subject:bug': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'backslash': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'this:': 0.26; 'header:X-Complaints- To:1': 0.27; 'header:In-Reply-To:1': 0.27; "skip:' 10": 0.31; '>>>>': 0.31; 'received:132': 0.31; 'strip': 0.31; 'could': 0.34; 'but': 0.35; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'email addr:gmail.com': 0.63; 'forward': 0.65
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
Subject Re: strip bug?
Date Wed, 25 Feb 2015 00:25:27 +0100
References <3a54074b-2517-472b-9fcc-50348933a959@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host remote239-224.home.uni-freiburg.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
In-Reply-To <3a54074b-2517-472b-9fcc-50348933a959@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.19154.1424820337.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1424820337 news.xs4all.nl 2927 [2001:888:2000:d::a6]:39681
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:86357

Show key headers only | View raw


On 25.02.2015 00:05, baykiwi@gmail.com wrote:
>>>> 'http://xthunder'.strip('http://')
> 'xthunder'
>>>> 'http://thunder'.strip('http://')
> 'under'
>>>>
>
> I could understand backslash but forward slash?
>

You are misunderstanding what the argument to strip does. Look at this:

 >>> 'http://xthunder'.strip('/hpt:')
'xthunder'

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


Thread

strip bug? baykiwi@gmail.com - 2015-02-24 15:05 -0800
  Re: strip bug? Eduardo <xcesar@gmail.com> - 2015-02-24 15:15 -0800
  Re: strip bug? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-24 16:16 -0700
  Re: strip bug? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-02-25 00:19 +0100
  Re: strip bug? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-02-25 00:25 +0100
  Re: strip bug? Chris Kaynor <ckaynor@zindagigames.com> - 2015-02-24 15:22 -0800
  Re: strip bug? Rustom Mody <rustompmody@gmail.com> - 2015-02-25 03:03 -0800
  Re: strip bug? babyG <bintadoma20@yahoo.com> - 2015-02-27 04:18 -0600

csiph-web