classification
Title: Document ... used in recursive repr of containers
Type: Stage: patch review
Components: Documentation Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, r.david.murray, rhettinger, terry.reedy, vexoxev
Priority: normal Keywords: easy, patch

Created on 2010-09-13 00:05 by eric.araujo, last changed 2017-10-22 21:18 by rhettinger.

Pull Requests
URL Status Linked Edit
PR 4063 open pablogsal, 2017-10-20 20:09
Messages (3)
msg116256 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-13 00:05
Built-in containers like dict use an ellipsis to represent a recursive item.  In the symbols index, “...” only links to the secondary prompt; I think it should also link to a paragraph explaining the display of recursive containers.
msg116262 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-09-13 00:55
... is also the Ellipsis object, and it is probably even more important that the index cross reference that usage :)
msg304762 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-10-22 21:18
Since the appearance of reprs is not guaranteed.  I don't think this should be documented (because doing so makes it a guaranteed behavior).  In fact, the appearance has changed over time from ... to  [...] in and may change at some point to <...> so that it can't be confused with an actual Ellipsis object.  At best this should be a FAQ entry or we can defer to behaviors that are documented and guaranteed (such as reprlib.recursive_repr() and its default fillvalue).  

I concur with David Murray that the Ellipsis object should be indexed and cross-referenced.
History
Date User Action Args
2017-10-22 21:18:50rhettingersetnosy: + rhettinger
messages: + msg304762
2017-10-20 20:09:07pablogsalsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request4033
2017-09-16 03:35:31vexoxevsetnosy: + vexoxev
2017-09-16 02:10:26eric.araujosetversions: + Python 3.6, Python 3.7, - Python 3.2, Python 3.3, Python 3.4
2013-03-09 07:57:24terry.reedysetversions: + Python 3.3, Python 3.4, - Python 3.1
2010-09-18 03:14:54terry.reedysetnosy: + terry.reedy
2010-09-13 00:55:41r.david.murraysetnosy: + r.david.murray
messages: + msg116262
2010-09-13 00:05:23eric.araujocreate