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


Groups > comp.lang.python > #33621

Re: Index Error

Date 2012-11-20 09:39 -0500
From Dave Angel <d@davea.name>
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>
Newsgroups comp.lang.python
Message-ID <mailman.58.1353422389.29569.python-list@python.org> (permalink)

Show all headers | 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