[issue9840] Recursive Repr
Éric Araujo mer...@netwok.org added the comment: FTR, the answer to my interrogation in my previous message is contained in Raymond’s PyCon talk about API design: http://pycon.blip.tv/file/4883290/ :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9840] Recursive Repr
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Committed in r84792. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9840] Recursive Repr
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: Add a recursive_repr() decorator to provide a solution to the problem of creating a container __repr__ method that doesn't fail for recursive calls. -- files: recursive_repr.patch keywords: patch messages: 116239 nosy: rhettinger priority: normal severity: normal status: open title: Recursive Repr type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18862/recursive_repr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9840] Recursive Repr
Éric Araujo mer...@netwok.org added the comment: Good idea. I wonder if the genericity (being able to specify the placeholder) is needed; the ellipsis is used by built-in containers (not documented AFAICT, see #9842) and seems a good choice for most (all?) of the cases. What bothers me is that this simple, common case can’t just use @recursive_repr (without parens) which seems to me more natural. One markup glitch: :meth:`repr__` lacks two underscores. (Unimportant side question: Since collections defines __all__, why are imported names renamed with a trailing underscore?) -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com