def __contains__(self, key):
        """
        Test for containment if the wrapped object is a list or dict.

        Do not always check for containment whenever it supports the
        operator, as this could result in some very sneaky bugs if a
        key in the JSON is a string instead of a nested JSON object.
        """
        if isinstance(self._obj, (dict, list)):
            return key in self._obj
        else:
            return False
def __contains__ ( self , key ) : if isinstance ( self . _obj , ( dict , list ) ) : return key in self . _obj else : return False
Test for containment if the wrapped object is a list or dict.

        Do not always check for containment whenever it supports the
        operator, as this could result in some very sneaky bugs if a
        key in the JSON is a string instead of a nested JSON object.