File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ Rationale
3333=========
3434
3535Pretty printing is very useful for displaying complex data structures, like dictionaries read from JSON
36- content. By providing a way for classes to customize how their instances participate in pretty printing,
36+ content. However, the existing :mod: `pprint ` module can only format builtin objects that it knows about.
37+ By providing a way for classes to customize how their instances participate in pretty printing,
3738users have more options for visually improving the display of their complex data, especially for debugging.
3839
3940By extending the built-in :func: `print ` function to automatically pretty print its output, debugging with
@@ -97,6 +98,14 @@ Built-in :func:`print` takes a new optional argument, appended to the end of the
9798 performs implicit instantiation.
9899
99100
101+ Additions to ``f-strings `` and ``str.format() ``
102+ -----------------------------------------------
103+
104+ In addition to the existing ``!s ``, ``!r ``, and ``!a `` conversion specifiers, an additional ``!p ``
105+ conversion will be added. The effect of this specifier with an expression ``value `` will be to call
106+ :py:meth: `pprint.pformat(value) `. In this initial specification, it will be an error to provide any format
107+ specifier if ``!p `` is used.
108+
100109Examples
101110========
102111
You can’t perform that action at this time.
0 commit comments