Skip to content

PEP 813: Address feedback so far in the DPO thread#4827

Merged
warsaw merged 16 commits intopython:mainfrom
warsaw:813-feedback
Mar 4, 2026
Merged

PEP 813: Address feedback so far in the DPO thread#4827
warsaw merged 16 commits intopython:mainfrom
warsaw:813-feedback

Conversation

@warsaw
Copy link
Member

@warsaw warsaw commented Feb 22, 2026

Various language improvements, clarifying some other things explicitly, adding an open issue with a suggestion, and adding a Deferred Ideas and Change History section.


📚 Documentation preview 📚: https://pep-previews--4827.org.readthedocs.build/

@warsaw warsaw self-assigned this Feb 22, 2026
Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@warsaw warsaw marked this pull request as ready for review February 24, 2026 00:45
  * For f-strings only (not ``str.format()``) the ``!p`` conversion field takes an optional "format spec".
  * The PEP no longer proposes a ``pretty`` argument to the ``print()`` built-in function.  With the
    addition of ``!p:callable`` syntax for f-strings, the new argument is unnecessary.
  * Specify that to pretty print tuples as positional arguments, use the 2-tuple value format, passing
    a "false-y" value as the argument name.
  * Clarify that a truth-y ``name`` must be a ``str``.
  * Specify that the ``!p`` conversion in f-strings and ``str.format()`` implicitly perform an
    import of the ``pprint`` module.
  * Describe the new Limited C API function ``PyObject_Pretty()``, and add the optional argument.
Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes.

@warsaw warsaw requested a review from ericvsmith March 4, 2026 17:56
Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit, otherwise LGTM. Thanks!

@warsaw warsaw merged commit 16ba0a4 into python:main Mar 4, 2026
5 checks passed
@warsaw warsaw deleted the 813-feedback branch March 4, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants