classification
Title: Py_ReprEnter and Py_ReprLeave are undocumented
Type: Stage: resolved
Components: Documentation Versions: Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: stutzbach Nosy List: amaury.forgeotdarc, docs@python, eric.araujo, georg.brandl, pitrou, stutzbach
Priority: normal Keywords: patch

Created on 2010-05-18 15:55 by stutzbach, last changed 2010-12-17 22:31 by stutzbach. 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
2010-12-17 22:31:27stutzbachsetstatus: open -> closed
nosy: georg.brandl, amaury.forgeotdarc, pitrou, stutzbach, eric.araujo, docs@python
2010-12-17 22:29:21stutzbachsetnosy: georg.brandl, amaury.forgeotdarc, pitrou, stutzbach, eric.araujo, docs@python
messages: + msg124261
2010-12-17 22:17:56amaury.forgeotdarcsetstatus: closed -> open
nosy: + amaury.forgeotdarc
messages: + msg124260

2010-12-17 16:36:16stutzbachsetstatus: open -> closed

assignee: eric.araujo -> stutzbach
versions: - Python 2.7
keywords: - needs review
nosy: georg.brandl, pitrou, stutzbach, eric.araujo, docs@python
messages: + msg124228
resolution: accepted
stage: patch review -> resolved
2010-12-17 15:58:41georg.brandlsetassignee: docs@python -> eric.araujo

messages: + msg124220
nosy: + georg.brandl
2010-12-15 23:07:21eric.araujosetnosy: pitrou, stutzbach, eric.araujo, docs@python
messages: + msg124091
2010-12-15 23:05:04stutzbachsetfiles: + repr-3.patch
nosy: pitrou, stutzbach, eric.araujo, docs@python
messages: + msg124090
2010-12-15 22:58:16eric.araujosetnosy: + eric.araujo
messages: + msg124087
2010-12-15 22:57:11stutzbachsetfiles: + repr-2.patch
nosy: pitrou, stutzbach, docs@python
2010-12-15 22:54:25pitrousetnosy: pitrou, stutzbach, docs@python
messages: + msg124085
2010-12-15 22:42:15stutzbachsetnosy: pitrou, stutzbach, docs@python
messages: + msg124083
2010-12-15 22:35:09pitrousetnosy: + pitrou
messages: + msg124081
2010-12-15 18:29:58stutzbachsetfiles: + repr.patch

assignee: stutzbach -> docs@python

keywords: + patch, needs review
nosy: + docs@python
messages: + msg124035
stage: needs patch -> patch review
2010-05-18 15:55:08stutzbachcreate