Issue226677

classification
Title: Throwing IndexError from __getitem__()
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn
Priority: low Keywords:

Created on 2000-12-22.14:52:30 by bckfnn, last changed 2001-03-05.19:59:38 by bckfnn.

Messages
msg228 (view) Author: Finn Bock (bckfnn) Date: 2000-12-22.14:52:30
A IndexError cannot be thrown from with a __getitem__() method. It is turned into a KeyError. This is a difference between CPython and Jython.

class Foo:
   def __getitem__(self, i):
       raise IndexError, i
foo = Foo()
foo[1]
msg229 (view) Author: Finn Bock (bckfnn) Date: 2001-03-05.19:59:38
Logged In: YES 
user_id=4201

Fixed in PyInstance.java: 2.21;
History
Date User Action Args
2000-12-22 14:52:30bckfnncreate