The phrase "built-in function" in the error message means that the corresponding function is not implemented on pure Python:
>>> import inspect >>> import numpy >>> inspect.getsource(print) Traceback (most recent call last): ... TypeError: <built-in function print> is not a module, class, method, function, traceback, frame, or code object >>> inspect.getsource(numpy.array) Traceback (most recent call last): ... TypeError: <built-in function array> is not a module, class, method, function, traceback, frame, or code object
Obviously, numpy.array not a "built-in function" in the sense of belonging to the __builtins__ namespace , but is a "built-in function" in the sense of "not implemented on pure Python".
The source code of such functions should be found in the relevant projects: CPython's print() , Pypy , Jython's print() , numpy.array() , numpy for Pypy .
printnot a function in Python 2 (without__future__).print()in Python 3 is a function (built-in function in CPython - both in the sense that it is not implemented on pure Python, or in the__builtins__namespace). - jfs