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


Groups > comp.lang.python > #33621

Re: Index Error

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.040
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; '21,': 0.07; 'subject:Error': 0.07; 'python': 0.09; 'cc:addr:python-list': 0.10; '12:57': 0.16; '2.7.3': 0.16; 'range.': 0.16; 'subject:Index': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'certainly': 0.17; 'skip': 0.17; '>>>': 0.18; 'equivalent': 0.20; 'suggested': 0.20; 'this:': 0.23; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'select': 0.26; 'am,': 0.27; 'cc:addr:gmail.com': 0.27; 'lines': 0.28; 'chris': 0.28; 'url:mailman': 0.29; 'url:python': 0.32; 'url:listinfo': 0.32; 'docs': 0.33; 'point.': 0.33; 'version': 0.34; 'text': 0.34; 'done': 0.34; 'thanks': 0.34; 'nov': 0.35; 'pm,': 0.35; 'list.': 0.35; 'url:org': 0.36; 'drop': 0.37; 'subject:: ': 0.38; 'delete': 0.38; 'page': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'url:mail': 0.40; 'your': 0.60; "you'll": 0.62; 'to,': 0.65; '20,': 0.65; 'kindly': 0.67; 'header :Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; '3:00': 0.84; 'drop-down': 0.84; 'received:74.208.4.194': 0.84; 'fun!': 0.95
Date Tue, 20 Nov 2012 09:39:31 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To inshu chauhan <insideshoes@gmail.com>
Subject Re: Index Error
References <CAFqGZRHSZ2QTqw=_iZWCWVJXVoxEZvHkTEmb-QeohRer2hjj7w@mail.gmail.com> <CAPTjJmp2vHhxB0KL7D1CQ64NGN2RQEDLbx7VPiVX79Pd1txu1Q@mail.gmail.com> <CAFqGZRGX5hBAm7xBvKY_=0XUurnxkhB4CYLdf9+dw_F-OzXuhQ@mail.gmail.com> <CAPTjJmpJY0vQoy-Le2xAO4Y8Tv1RV5_62UW_1AfJV0d4DMtX1w@mail.gmail.com> <CAFqGZRGQKWNSO2om2mv7YxGg=8zCEr4kY_9rJyUoFZU6tJ9Bcg@mail.gmail.com>
In-Reply-To <CAFqGZRGQKWNSO2om2mv7YxGg=8zCEr4kY_9rJyUoFZU6tJ9Bcg@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Provags-ID V02:K0:W0gxmZM5ZHAbkDZ3JujQxC72I11ka4xRGSnVR2aSYT8 JHIuUOzAS+/wErptYD5KPWA0JsAezMwFQSNK3n1rtY6FCmT6eI PTkDuAasOBdtCK+uLZYbImBVJf6oyz6AEHDiG9OTvdeAWGUizT 0bqREdkXJ29yXRg6ySgEmFC8GX4iykFvvjaWpD6e8hbllOJdm7 Fr6uZEHhQmPC87hLjvPMH9JvIlWyj+uP9/K7ORvKm3VSQ+famD av2vEpQScQwUapdpFJOyzbw53UFkETpxLfFNx+mrtX5jgJoFPp AaGkHH7jPEbOcWEaIp8V62es1RnGzvKtyXj00Bvlc8SR1600A= =
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
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.58.1353422389.29569.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353422389 news.xs4all.nl 6986 [2001:888:2000:d::a6]:59290
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33621

Show key headers only | View raw


On 11/20/2012 09:11 AM, inshu chauhan wrote:
> On Tue, Nov 20, 2012 at 3:00 PM, Chris Angelico <rosuav@gmail.com> wrote:
>
>> On Wed, Nov 21, 2012 at 12:57 AM, inshu chauhan <insideshoes@gmail.com>
>> wrote:
>>> I am using python 2.7.3 , so can it be done in that ?
>> (Please don't top-post; just delete the couple of blank lines that
>> gmail oh so kindly provides, and type your response at the bottom. You
>> may also want to consider trimming the quoted text to just what you
>> actually need.)
>>
>> Yes, it certainly can. Go to the docs page I linked to, then up the
>> top left you'll see this:
>>
>>  Python ยป 3.3.0  Documentation
>>
>> with the "3.3.0" part a drop-down list. Drop it down and select 2.7,
>> and you'll see the equivalent page for version 2.7.3.
>>
>> Have fun!
>>
>> ChrisA
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
> Ok.. Thanks a ton ...
>
>
>

The catch to the approach suggested by Chris is that you DON'T want to
break out of the whole loop when one value is out of range.  You only
want to skip that one point.



-- 

DaveA

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


Thread

Re: Index Error Dave Angel <d@davea.name> - 2012-11-20 09:39 -0500

csiph-web