On 2020-07-24 at 15:10:46 -0000, Gábor Bernát <jokerjoke...@gmail.com> wrote:
> ... 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. > Maybe repr is not the best here, because that should be interpreter > meaningful, but instead the __str__ method that's better for > this. Maybe we could pass in an optional limit argument to these > methods, so that the user can decide what to print depending on how > many characters he has left? > Any takes, better ideas how we could help this problem? Use the pretty printer/formatter.¹ Start with a small depth and let the user adjust it. ¹ https://docs.python.org/3/library/pprint.html _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/PTYLW3NVCVWJIGXKN5DQQBAWHEKQ23Z3/ Code of Conduct: http://python.org/psf/codeofconduct/