diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-01 08:00:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 08:00:15 (GMT) |
commit | 2085bd0877e17ad4d98a4586d5eabb6faecbb190 (patch) | |
tree | c25b20d33ebf4d64a28abb8591f4ff7acf90614c /Doc/library/string.rst | |
parent | 4a686504eb2bbf69adf78077458508a7ba131667 (diff) | |
download | cpython-2085bd0877e17ad4d98a4586d5eabb6faecbb190.zip cpython-2085bd0877e17ad4d98a4586d5eabb6faecbb190.tar.gz cpython-2085bd0877e17ad4d98a4586d5eabb6faecbb190.tar.bz2 |
bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r-- | Doc/library/string.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index c2f6522..288dde6 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -88,7 +88,7 @@ implementation as the built-in :meth:`~str.format` method. The :class:`Formatter` class has the following public methods: - .. method:: format(format_string, *args, **kwargs) + .. method:: format(format_string, /, *args, **kwargs) The primary API method. It takes a format string and an arbitrary set of positional and keyword arguments. @@ -720,7 +720,7 @@ these rules. The methods of :class:`Template` are: The constructor takes a single argument which is the template string. - .. method:: substitute(mapping, **kwds) + .. method:: substitute(mapping={}, /, **kwds) Performs the template substitution, returning a new string. *mapping* is any dictionary-like object with keys that match the placeholders in the @@ -729,7 +729,7 @@ these rules. The methods of :class:`Template` are: and there are duplicates, the placeholders from *kwds* take precedence. - .. method:: safe_substitute(mapping, **kwds) + .. method:: safe_substitute(mapping={}, /, **kwds) Like :meth:`substitute`, except that if placeholders are missing from *mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the |