Decorate namedtuple's default repr with @reprlib.recursive_repr
#129387
Labels
type-feature
A feature request or enhancement
Content-Length: 223278 | pFad | http://github.com/python/cpython/issues/129387
DD@reprlib.recursive_repr
#129387
Fetched URL: http://github.com/python/cpython/issues/129387
Alternative Proxies:
Feature or enhancement
Proposal:
For
Before decorating:
after decorating:
(Note that if
our_final_destination
pointed toFoo
, e.g. via a mutable object that didn't have recursive repr support but includedfoo
in its repr, printingfoo
would fail with a recursion limit excess. It's not a bug of CPython by any means though.)The decorator is already available in the module as
_recursive_repr
, so it's just a matter of application.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
The text was updated successfully, but these errors were encountered: