gh-111999: Add signatures and improve docstrings for builtins (GH-112000)

This commit is contained in:
Serhiy Storchaka 2023-11-13 09:13:49 +02:00 committed by GitHub
parent d0058cbd1c
commit 1d75ef6b61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 74 additions and 39 deletions

View file

@ -13390,15 +13390,17 @@ _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer)
#include "stringlib/unicode_format.h"
PyDoc_STRVAR(format__doc__,
"S.format(*args, **kwargs) -> str\n\
"format($self, /, *args, **kwargs)\n\
--\n\
\n\
Return a formatted version of S, using substitutions from args and kwargs.\n\
Return a formatted version of the string, using substitutions from args and kwargs.\n\
The substitutions are identified by braces ('{' and '}').");
PyDoc_STRVAR(format_map__doc__,
"S.format_map(mapping) -> str\n\
"format_map($self, /, mapping)\n\
--\n\
\n\
Return a formatted version of S, using substitutions from mapping.\n\
Return a formatted version of the string, using substitutions from mapping.\n\
The substitutions are identified by braces ('{' and '}').");
/*[clinic input]
@ -14696,7 +14698,7 @@ errors is specified, then the object must expose a data buffer\n\
that will be decoded using the given encoding and error handler.\n\
Otherwise, returns the result of object.__str__() (if defined)\n\
or repr(object).\n\
encoding defaults to sys.getdefaultencoding().\n\
encoding defaults to 'utf-8'.\n\
errors defaults to 'strict'.");
static PyObject *unicode_iter(PyObject *seq);