[New-bugs-announce] [issue41383] Provide a limit arguments for __repr__

Bernat Gabor report at bugs.python.org
Fri Jul 24 10:04:53 EDT 2020


New submission from Bernat Gabor <gaborjbernat at gmail.com>:

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 in Variables View (=show their string representation) it can takes a lot of time. We do some tricks, but they not always work. It would be really-really cool to have parameter in repr, which defines max number of symbols we want to evaluate during repr for this object.

What do people, would this optional str limit be a good thing? Does anyone has a better idea?

----------
components: Interpreter Core
messages: 374179
nosy: Bernat Gabor
priority: normal
severity: normal
status: open
title: Provide a limit arguments for __repr__
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41383>
_______________________________________


More information about the New-bugs-announce mailing list