mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-111999: Add signatures and improve docstrings for builtins (GH-112000)
This commit is contained in:
parent
d0058cbd1c
commit
1d75ef6b61
8 changed files with 74 additions and 39 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue