Skip to content

Commit fe057ad

Browse files
committed
The pygments parser doesn't know about !p
1 parent fa287d5 commit fe057ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

peps/pep-0813.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Now let's create a couple of instances and pretty print them:
154154
The ``!p`` conversion specifier can be used in f-strings and ``str.format()`` to pretty print values:
155155

156156
.. code-block:: pycon
157+
:force:
157158
158159
>>> print(f'{precision=!p}')
159160
precision=Bass(4, pickups='split coil P')
@@ -165,6 +166,7 @@ For f-strings only, the ``!p`` conversion field also accepts a format spec expre
165166
evaluate to a callable taking a single argument and returning a string:
166167

167168
.. code-block:: pycon
169+
:force:
168170
169171
>>> def slappa(da: Bass) -> str:
170172
... return 'All about that bass'

0 commit comments

Comments
 (0)