list index()

Ben Finney bignose+hates-spam at benfinney.id.au
Thu Aug 30 04:00:37 EDT 2007


Marc 'BlackJack' Rintsch <bj_666 at gmx.net> writes:

> On Thu, 30 Aug 2007 17:09:36 +1000, Ben Finney wrote:
> > It's letting you know that the item isn't in the list. There's no
> > sensible return value from an "index" function in that condition.
> 
> What about -1?  C programmers do this all the time.  :-)

I don't believe you've contradicted me :-)

-- 
 \        "If you ever drop your keys into a river of molten lava, let |
  `\              'em go, because, man, they're gone."  -- Jack Handey |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list