added haskey function for PyObject