[New-bugs-announce] [issue40970] Error in Python Datamodel Documentation

Christopher Yeh report at bugs.python.org
Sat Jun 13 19:37:57 EDT 2020

New submission from Christopher Yeh <chrisyeh96 at gmail.com>:

The documentation says the following:

> A built-in function object is a wrapper around a C function.  Examples of built-in functions are `len` and `math.sin` (`math` is a standard built-in module).

However, `math` is not always a built-in module, as can be seen in on my own Python installation (Windows 10, WSL 1, Python 3.7.7 installed via conda).

>>> import sys
>>> sys.builtin_module_names
('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')

Therefore, I have submitted a pull request to remove the statement "(`math` is a standard built-in module)" from the documentation.

assignee: docs at python
components: Documentation
messages: 371473
nosy: chrisyeh, docs at python
priority: normal
pull_requests: 20055
severity: normal
status: open
title: Error in Python Datamodel Documentation
type: enhancement
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list