-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-42259: clarify pprint saferepr docs #30256
Conversation
Doc/library/pprint.rst
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sp: overridden
@iritkatriel adding you as a reviewer, please take a look if you have time.. |
I'm not sure if news entry should be added or not. |
This PR is stale because it has been open for 30 days with no activity. |
There was a problem hiding this 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>
Thanks to all for reviewing and @rhettinger for merging! |
@rhettinger |
Clarify limitations to recursion protection in
pprint.saferepr
https://bugs.python.org/issue42259