diff --git a/peps/pep-0813.rst b/peps/pep-0813.rst index 973c5eb7879..74eee19bc12 100644 --- a/peps/pep-0813.rst +++ b/peps/pep-0813.rst @@ -7,7 +7,8 @@ Type: Standards Track Created: 07-Nov-2025 Python-Version: 3.16 Post-History: `21-Feb-2026 `__, - `04-Mar-2026 `__ + `04-Mar-2026 `__, + `24-Oct-2026 `__ Abstract @@ -1217,8 +1218,9 @@ None at this time. Change History ============== -* `[DD-Mmm-2026] `__ +* `24-Oct-2026 `__ + * Add a new default printer, ``pprint.Printer``, and leave ``pprint.PrettyPrinter`` unchanged. * ``__pprint__()`` describes an object's structure, and the printer makes all layout decisions. * Section markers ``pprint.VALUES``, ``pprint.KWARGS`` and ``pprint.ITEMS`` say how tuples are read, replacing the reading of tuples by their shape and the "false-y" name for positional tuple values. @@ -1228,13 +1230,12 @@ Change History own vocabulary. * Add ``pprint.decompose()``, and the ``pprint.LEAF`` sentinel that it returns for a leaf. * Defer a table of markers in the default printer, and a way to change the default printer. - * Add ``pprint.DescriptionType`` for annotating ``__pprint__()`` methods. - * Add a ``hints`` attribute to ``pprint.Layout``, for particular printers. + * Add ``pprint.DescriptionType`` for type annotating ``__pprint__()`` methods. + * Add an optional ``hints`` attribute to ``pprint.Layout``, which can be used by third-party printers. * Add a ``hug`` attribute to ``pprint.Layout``, so that ``defaultdict`` and similar types keep ``PrettyPrinter``'s layout. - * Add a new default printer, ``pprint.Printer``, and leave ``pprint.PrettyPrinter`` unchanged. * A printer returns an iterable of lines, and ``!p`` joins them with ``'\n'``. - * Specify how the default printer lays out, sorts and limits the depth of nested objects, including keys + * Specify how the default printer lays out, sorts, and limits the depth of nested objects, including keys that wrap. * The default printer's ``expand`` option takes a ``pprint.Expand`` member: ``NEVER``, ``FIT`` or ``ALWAYS``. Its defaults are ``width=78``, ``indent=4`` and ``expand=Expand.FIT``. @@ -1245,7 +1246,7 @@ Change History * The default printer's ``number_format`` option replaces ``underscore_numbers``. * Specify when an inherited ``__pprint__()`` is used, and explain why. * :mod:`dataclasses` and :func:`~collections.namedtuple` generate ``__pprint__()`` methods. - * The ``!p`` format spec is a single replacement field, ``f'{obj!p:{printer}}'``, whose value is called + * The ``!p`` format spec can be a single replacement field, ``f'{obj!p:{printer}}'``, whose value is called without first being converted to a string. Any other spec is a :exc:`SyntaxError`. * A printer of ``None`` means the default printer, in f-strings, t-strings and ``PyObject_Pretty()``. * In ``str.format()``, a format spec after ``!p`` pads the pretty printed string.