Raymond Hettinger <[email protected]> added the comment:
FWIW, the word "built-in" is being used in two different ways here. It is used
in a strict sense for sys.builtin_module_names and in a general sense in the
datamodel docs.
The former only includes modules compiled into the core exe or dll file. The
latter includes anything in compiled extension such as the math module. The
latter is part of the standard build in the sense that it is included in
setup.py and parts of the library depend on it being present:
~ $ python3.8
Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 'math' in sys.builtin_module_names
>>> False
>>> import math
>>> type(math.sin)
<class 'builtin_function_or_method'>
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40970>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com