Skip to content

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Aug 8, 2025

This is a draft proof-of-concept implementation of PEP 802.

A


📚 Documentation preview 📚: https://cpython-previews--137565.org.readthedocs.build/

Copy link
Contributor

@nineteendo nineteendo left a comment

Choose a reason for hiding this comment

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

I think you forgot Lib/pprint.py.

@AA-Turner
Copy link
Member Author

@nineteendo can you elaborate?

Running Release|x64 interpreter...
Python 3.15.0a0 (remotes/upstream/HEAD-1-g71075ef1c9e-dirty:71075ef1c9e, Aug  8 2025, 19:28:32) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pprint import pp
>>> pp({/})
{/}
>>> pp(set())
{/}
>>> pp(frozenset())
frozenset()

@nineteendo
Copy link
Contributor

nineteendo commented Aug 9, 2025

Ah, that's handled by repr(), I didn't need to change it:

cpython/Lib/pprint.py

Lines 312 to 313 in d7dbde8

if not len(object):
stream.write(repr(object))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants