id() tells you nothing about the nature of the function. Use the inspect.isbuiltin():
>>> import bisect >>> bisect.bisect <built-in function bisect> >>> import inspect >>> def foo(): pass ... >>> inspect.isbuiltin(foo) False >>> inspect.isbuiltin(bisect.bisect) True It's perhaps a bit poorly named, but "builtin" functions are those not written in Python. That is, those written in C or C++. Skip -- https://mail.python.org/mailman/listinfo/python-list