You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's better than a pretty print? A colorful pretty print!
By extracting the syntax highlighting code from the REPL, we can get the same colorization for literals in the pprint module.
I had Codex make me an example, and it works pretty nicely:
This will likely conflict with the PEP 813 reference implementation, so I'm going to keep the PR as a draft for now.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Activity
StanFromIreland commentedon Oct 23, 2026
This is a duplicate of #145217, no?
hugovk commentedon Oct 23, 2026
Yes, I think the issue is a duplicate, but my PR has stalled so I welcome a new attempt!
Do have a read through the comments on my PR and check the blockers are addressed or not relevant in your approach (I've not looked yet).
ZeroIntensity commentedon Oct 23, 2026
Ah, I thought the idea sounded familiar! I'll take a look at your PR.
warsaw commentedon Oct 24, 2026
Let's think about this in relation to the PEP 813 work.
ZeroIntensity commentedon Oct 24, 2026
Yeah, I don't plan on marking the PR as non-draft until a decision is made on PEP 813.