[issue41383] Provide a limit arguments for __repr__

2020-07-26 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41383] Provide a limit arguments for __repr__

2020-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suggest taking this to Python ideas. While there is a legitimate concern about large objects in a Variable View, the idea impacts long-standing core APIs. Accordingly, it needs to be thought through, become better specified, and be evaluated against

[issue41383] Provide a limit arguments for __repr__

2020-07-24 Thread Bernat Gabor
Bernat Gabor added the comment: Thanks Rémi, did not know about it. Played around with it, and is not entirely what we'd need here. That class still generates the long string repr, just truncates it afterwards. That is unless teh Repr implements custom formatting for the types, however the

[issue41383] Provide a limit arguments for __repr__

2020-07-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Bernat, have you looked into reprlib.repr()? It's an alternative implementation of repr() made for cases like this. You may be interested in this PR too: https://github.com/python/cpython/pull/20925 Alternatively, I think pprint.pformat() may be useful for

[issue41383] Provide a limit arguments for __repr__

2020-07-24 Thread Bernat Gabor
New submission from Bernat Gabor : Quoting Elizaveta Shashkova from EuroPython 2020 chat about how can we improve debug experience for users: I would like to have a lazy repr evaluation for the objects! Sometimes users have many really large objects, and when debugger is trying to show them