diff --git a/Doc/conf.py b/Doc/conf.py index c1b07df08b1782..d69c560f367a09 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -38,6 +38,7 @@ 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', + 'sphinx.ext.imgconverter', ] # Skip if downstream redistributors haven't installed them diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 21fe35edc1bef8..bad64f4eeef5e5 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2173,9 +2173,6 @@ expression support in the :mod:`re` module). False - -.. _meth-str-join: - .. method:: str.join(iterable, /) Return a string which is the concatenation of the strings in *iterable*. @@ -2183,6 +2180,14 @@ expression support in the :mod:`re` module). *iterable*, including :class:`bytes` objects. The separator between elements is the string providing this method. + For example: + + .. doctest:: + >>> ', '.join(['spam', 'spam', 'spam']) + 'spam, spam, spam' + >>> '-'.join('Python') + 'P-y-t-h-o-n' + .. method:: str.ljust(width, fillchar=' ', /)