Index: src/org/python/core/PyObject.java =================================================================== --- src/org/python/core/PyObject.java (revision 3440) +++ src/org/python/core/PyObject.java (working copy) @@ -1685,7 +1688,10 @@ * @return the result of the search. **/ public final PyObject _in(PyObject o) { - return Py.newBoolean(o.__contains__(this)); + if(o instanceof PyDictionary ) + return Py.newBoolean(((PyDictionary)o).has_key(this)); + else + return Py.newBoolean(o.__contains__(this)); } /** @@ -1695,7 +1701,10 @@ * @return the result of the search. **/ public final PyObject _notin(PyObject o) { - return Py.newBoolean(!o.__contains__(this)); + if(o instanceof PyDictionary ) + return Py.newBoolean(!(((PyDictionary)o).has_key(this))); + else + return Py.newBoolean(!o.__contains__(this)); } /**