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


Groups > comp.lang.python > #93764

str.index() and str.find() versus only list.index()

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.91.MISMATCH!newsfeed.xs4all.nl!newsfeed8.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.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:()': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:versus': 0.16; 'aspect': 0.22; 'header:User-Agent:1': 0.26; 'header:X-Complaints- To:1': 0.26; 'question:': 0.29; 'str': 0.29; 'received:be': 0.30; 'received:84': 0.32; 'that,': 0.34; 'list': 0.34; 'knowledge': 0.35; 'there': 0.36; 'faster': 0.36; 'to:addr:python-list': 0.36; 'received:org': 0.37; 'hi,': 0.38; 'why': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'life': 0.67; 'isaac': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Roel Schroeven <roel@roelschroeven.net>
Subject str.index() and str.find() versus only list.index()
Date Mon, 13 Jul 2015 18:56:33 +0200
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host d54c57c9e.access.telenet.be
User-Agent Thunderbird 2.0.0.24 (Windows/20100228)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.470.1436806619.3674.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1436806619 news.xs4all.nl 2894 [2001:888:2000:d::a6]:38189
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 2660
X-Received-Body-CRC 2527729765
Xref csiph.com comp.lang.python:93764

Show key headers only | View raw


Hi,

Quick question: why does str have both index() and find(), while list 
only has index()? Is there a reason for that, or is it just an 
historical accident?


Best regards,
Roel

-- 
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
   -- Isaac Asimov

Roel Schroeven

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


Thread

str.index() and str.find() versus only list.index() Roel Schroeven <roel@roelschroeven.net> - 2015-07-13 18:56 +0200

csiph-web