def dump(self, obj, tag = None, typed = 1, ns_map = {}):
        if Config.debug: print "In dump.", "obj=", obj
        ns_map = ns_map.copy()
        self.depth += 1
        if type(tag) not in (NoneType, StringType, UnicodeType):
            raise KeyError, "tag must be a string or None"
        if isinstance(obj, anyType):
            methname = "dump_instance"
        else:
            methname = "dump_" + type(obj).__name__
        try:
            meth = getattr(self, methname)
        except __HOLE__:
            if type(obj) == LongType:
                obj_type = "integer"
            elif pythonHasBooleanType and type(obj) == BooleanType:
                obj_type = "boolean"
            else:
                obj_type = type(obj).__name__

            self.out.append(self.dumper(None, obj_type, obj, tag, typed,
                                        ns_map, self.genroot(ns_map)))
        else:
            meth(obj, tag, typed, ns_map)


        self.depth -= 1

    # generic dumper
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/SOAPpy/SOAPBuilder.py/SOAPBuilder.dump