Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-42259: clarify pprint saferepr docs #30256

Merged
merged 8 commits into from May 10, 2022

Conversation

akulakov
Copy link
Contributor

@akulakov akulakov commented Dec 25, 2021

Clarify limitations to recursion protection in pprint.saferepr

https://bugs.python.org/issue42259

@@ -183,6 +183,10 @@ One more support function is also defined:
recursive reference will be represented as ``<Recursion on typename with
id=number>``. The representation is not otherwise formatted.

Note that for recursive protection to apply, data structures have to be
subclassed from :class:`~object.dict`, :class:`~object.list` or
:class:`~object.tuple` and the ``__repr__`` method must not be overriden.
Copy link
Contributor Author

@akulakov akulakov Dec 25, 2021

Choose a reason for hiding this comment

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

sp: overridden

@akulakov akulakov requested a review from iritkatriel Dec 25, 2021
@akulakov
Copy link
Contributor Author

akulakov commented Dec 25, 2021

@iritkatriel adding you as a reviewer, please take a look if you have time..

@akulakov
Copy link
Contributor Author

akulakov commented Dec 25, 2021

I'm not sure if news entry should be added or not.

@github-actions
Copy link

github-actions bot commented Feb 4, 2022

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Feb 4, 2022
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Builds ok and reads sensibly.

Doc/library/pprint.rst Outdated Show resolved Hide resolved
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@rhettinger rhettinger merged commit 392fd27 into python:main May 10, 2022
13 checks passed
@akulakov
Copy link
Contributor Author

akulakov commented May 13, 2022

Thanks to all for reviewing and @rhettinger for merging!

@akulakov akulakov deleted the 42259-Clarify-pprint-saferepr-docs branch May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants