Skip to content

Commit fce429b

Browse files
committed
gh-106318: Add doctest role and 'See also' for str.zfill()
1 parent a31020b commit fce429b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,13 +2842,17 @@ expression support in the :mod:`re` module).
28422842
than before. The original string is returned if *width* is less than
28432843
or equal to ``len(s)``.
28442844

2845-
For example::
2845+
For example:
2846+
2847+
.. doctest::
28462848

28472849
>>> "42".zfill(5)
28482850
'00042'
28492851
>>> "-42".zfill(5)
28502852
'-0042'
28512853

2854+
See also :meth:`rjust`.
2855+
28522856

28532857
.. index::
28542858
single: ! formatted string literal

0 commit comments

Comments
 (0)