def _bnormal(self, obj = {}):
            if isinstance(obj, types.NoneType):
                return "null"
            # Boolean needs to be checked before numeric types as Booleans are also IntType
            elif isinstance(obj, types.BooleanType):
                return str(obj).lower()
            elif isinstance(obj, (types.FloatType, types.IntType, types.LongType, types.ComplexType)):
                print "Dropping number: {0}\n".format(obj)
                raise TypeError("Numbers not permitted")
                # return str(obj)
            elif isinstance(obj, types.StringType):
                return obj
            elif isinstance(obj, types.UnicodeType):
                return obj
            elif isinstance(obj, types.ListType):
                nobj = []
                for child in obj:
                    try:
                        nobj.append(self._bnormal(child))
                    except TypeError:
                        pass
                return nobj
            elif isinstance(obj, types.DictType):
                for key in obj.keys():
                    try:
                        obj[key] = self._bnormal(obj[key])
                    except __HOLE__:
                        pass
                return obj
            else:
                return obj
dataset/ETHPy150Open jimklo/LRSignature/src/LRSignature/sign/Sign.py/Sign_0_21._bnormal