def dict_to_object(self, d):
        if d in '__class__':
            class_name = d.pop('__class__')
            module_name = d.pop('__module__')
            module = __import__(module_name)
            print 'MODULE:', module
            class_ = getattr(module, class_name)
            print 'CLASS:', class_
            args = dict((key.encode('ascii'), value) for key, value in d.items())
            print 'INSTANCE ARGS:', args
            inst = class_(**args)
        else:
            inst = d
        return inst
dataset/ETHPy150Open Akagi201/learning-python/json/json_decoder_object_hook.py/MyDecoder.dict_to_object/swapped operands of `in`