Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 51d2fd9

Browse files
committed
Added more to docstrings for str.format, format_map, and __format__.
1 parent 7c03d8c commit 51d2fd9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Objects/unicodeobject.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9026,12 +9026,14 @@ unicode_endswith(PyUnicodeObject *self,
90269026
PyDoc_STRVAR(format__doc__,
90279027
"S.format(*args, **kwargs) -> str\n\
90289028
\n\
9029-
");
9029+
Return a formatted version of S, using substitutions from args and kwargs.\n\
9030+
The substitutions are identified by braces ('{' and '}').");
90309031

90319032
PyDoc_STRVAR(format_map__doc__,
90329033
"S.format_map(mapping) -> str\n\
90339034
\n\
9034-
");
9035+
Return a formatted version of S, using substitutions from mapping.\n\
9036+
The substitutions are identified by braces ('{' and '}').");
90359037

90369038
static PyObject *
90379039
unicode__format__(PyObject* self, PyObject* args)
@@ -9049,7 +9051,7 @@ unicode__format__(PyObject* self, PyObject* args)
90499051
PyDoc_STRVAR(p_format__doc__,
90509052
"S.__format__(format_spec) -> str\n\
90519053
\n\
9052-
");
9054+
Return a formatted version of S as described by format_spec.");
90539055

90549056
static PyObject *
90559057
unicode__sizeof__(PyUnicodeObject *v)

0 commit comments

Comments
 (0)