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

Choose a reason for hiding this comment

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

sp: overridden

@akulakov
Copy link
Contributor Author

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

@akulakov
Copy link
Contributor Author

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

Choose a reason for hiding this comment

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

Builds ok and reads sensibly.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@akulakov
Copy link
Contributor Author

Thanks to all for reviewing and @rhettinger for merging!

@akulakov akulakov deleted the 42259-Clarify-pprint-saferepr-docs branch May 13, 2022 23:52
@furkanonder
Copy link
Contributor

@rhettinger saferepr and isrecursive definitions have been changed. I think we can close the issue.

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.

8 participants