Issue 8753: Py_ReprEnter and Py_ReprLeave are undocumented (original) (raw)

Created on 2010-05-18 15:55 by stutzbach, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
repr.patch stutzbach,2010-12-15 18:29
repr-2.patch stutzbach,2010-12-15 22:57 revised patch
repr-3.patch stutzbach,2010-12-15 23:05 further revised patch
Messages (11)
msg124035 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-12-15 18:29
Attached is a patch to add documentation for Py_ReprEnter and Py_ReprLeave. Assigning to docs@python for review.
msg124081 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-12-15 22:35
I think this is a bit misleading. These functions are only needed if you are implementing a container. For the general case where you don't display another Python object in your repr() (or you only display objects which are themselves atomic, such as strings and integers), these functions are not necessary.
msg124083 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-12-15 22:42
Good point. My perspective is skewed by all of the time that I spend working on container types. :-) How about if I change the first sentence to the following? Properly implementing :attr:`tp_repr` for container types requires special recursion handling.
msg124085 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-12-15 22:54
> How about if I change the first sentence to the following? > > Properly implementing :attr:`tp_repr` for container types requires > special recursion handling. This looks good to me.
msg124087 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-15 22:58
Possibly related: #9840
msg124090 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-12-15 23:05
Thanks. New patch attached with a cross-reference to reprlib.recursive_repr.
msg124091 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-15 23:07
Patch LGTM, except for “As examples” which I’ve never read before (but I’m not a native speaker).
msg124220 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-17 15:58
Yep, looks good, please commit.
msg124228 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-12-17 16:36
Committed in r87339. Thanks everyone for the feedback!
msg124260 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-12-17 22:17
Err... in r87339 there is a typo in all occurrences of 'Py_ReprEntr': Py_ReprEnter of course!
msg124261 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) Date: 2010-12-17 22:29
On Fri, Dec 17, 2010 at 2:17 PM, Amaury Forgeot d'Arc wrote wrote: > Err... in r87339 there is a typo in all occurrences of > 'Py_ReprEntr': Py_ReprEnter of course! Well, that's embarrassing. Fixed in r87354.
History
Date User Action Args
2022-04-11 14:57:01 admin set github: 52999
2010-12-17 22:31:27 stutzbach set status: open -> closednosy:georg.brandl, amaury.forgeotdarc, pitrou, stutzbach, eric.araujo, docs@python
2010-12-17 22:29:21 stutzbach set nosy:georg.brandl, amaury.forgeotdarc, pitrou, stutzbach, eric.araujo, docs@pythonmessages: +
2010-12-17 22:17:56 amaury.forgeotdarc set status: closed -> opennosy: + amaury.forgeotdarcmessages: +
2010-12-17 16:36:16 stutzbach set status: open -> closedassignee: eric.araujo -> stutzbachversions: - Python 2.7keywords: - needs reviewnosy:georg.brandl, pitrou, stutzbach, eric.araujo, docs@pythonmessages: + resolution: acceptedstage: patch review -> resolved
2010-12-17 15:58:41 georg.brandl set assignee: docs@python -> eric.araujomessages: + nosy: + georg.brandl
2010-12-15 23:07:21 eric.araujo set nosy:pitrou, stutzbach, eric.araujo, docs@pythonmessages: +
2010-12-15 23:05:04 stutzbach set files: + repr-3.patchnosy:pitrou, stutzbach, eric.araujo, docs@pythonmessages: +
2010-12-15 22:58:16 eric.araujo set nosy: + eric.araujomessages: +
2010-12-15 22:57:11 stutzbach set files: + repr-2.patchnosy:pitrou, stutzbach, docs@python
2010-12-15 22:54:25 pitrou set nosy:pitrou, stutzbach, docs@pythonmessages: +
2010-12-15 22:42:15 stutzbach set nosy:pitrou, stutzbach, docs@pythonmessages: +
2010-12-15 22:35:09 pitrou set nosy: + pitroumessages: +
2010-12-15 18:29:58 stutzbach set files: + repr.patchassignee: stutzbach -> docs@pythonkeywords: + patch, needs reviewnosy: + docs@pythonmessages: + stage: needs patch -> patch review
2010-05-18 15:55:08 stutzbach create