import types bim = types.BuiltinMethodType bim2 = types.BuiltinFunctionType assert bim == bim2, "BuiltinFunctionType is not the same as BuiltinMethodType" a = type([].append) b = type(dir) assert a== bim, "not a BuiltinMethodType" assert a == type(dir), "Not same types" assert b == bim, "Not same types" assert b == bim2, "Not same types" try: import inspect assert inspect.isbuiltin([].append), "not builtin" assert inspect.isbuiltin(dir), "not builtin" except: print "BOom!, inspect problem"