[Python-checkins] gh-103886: Improve `builtins.__doc__` (#104179)

JelleZijlstra webhook-mailer at python.org
Sat May 6 22:05:41 EDT 2023


https://github.com/python/cpython/commit/b35711d17a90251bdd57d255090e07daafe89f6c
commit: b35711d17a90251bdd57d255090e07daafe89f6c
branch: main
author: Tomas R <tomas.roun8 at gmail.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2023-05-06T19:05:34-07:00
summary:

gh-103886: Improve `builtins.__doc__` (#104179)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra at gmail.com>

files:
M Python/bltinmodule.c

diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 8840bbabe4b5..ddddc03ca316 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -3014,9 +3014,16 @@ static PyMethodDef builtin_methods[] = {
 };
 
 PyDoc_STRVAR(builtin_doc,
-"Built-in functions, exceptions, and other objects.\n\
+"Built-in functions, types, exceptions, and other objects.\n\
 \n\
-Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.");
+This module provides direct access to all 'built-in'\n\
+identifiers of Python; for example, builtins.len is\n\
+the full name for the built-in function len().\n\
+\n\
+This module is not normally accessed explicitly by most\n\
+applications, but can be useful in modules that provide\n\
+objects with the same name as a built-in value, but in\n\
+which the built-in of that name is also needed.");
 
 static struct PyModuleDef builtinsmodule = {
     PyModuleDef_HEAD_INIT,



More information about the Python-checkins mailing list