--- jython clean/org/python/core/PyDictionaryDerived.java 2005-06-20 13:12:13.000000000 -0400 +++ jython/org/python/core/PyDictionaryDerived.java 2006-03-16 01:33:53.671875000 -0500 @@ -757,7 +757,7 @@ public PyObject __finditem__(PyObject key) { // ??? PyType self_type = getType(); - PyObject impl = self_type.lookup("__getitem__"); + PyObject impl = self_type.lookup("__finditem__"); if (impl != null) try { return impl.__get__(this, self_type).__call__(key); @@ -769,6 +769,20 @@ return super.__finditem__(key); } + public PyObject __getitem__(PyObject key) { // ??? + PyType self_type = getType(); + PyObject impl = self_type.lookup("__getitem__"); + if (impl != null) + try { + return impl.__get__(this, self_type).__call__(key); + } catch (PyException exc) { + if (Py.matchException(exc, Py.LookupError)) + return null; + throw exc; + } + return super.__getitem__(key); + } + public void __setitem__(PyObject key, PyObject value) { // ??? PyType self_type = getType(); PyObject impl = self_type.lookup("__setitem__");