[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values
Maor Kleinberger
report at bugs.python.org
Wed Feb 19 07:21:29 EST 2020
Maor Kleinberger <kmaork at gmail.com> added the comment:
> This could sometimes make the output verbose
We could limit the length of the recursive __repr__ functions, and display partial reprs suffixed with ..., like in numpy for example.
We can define that the maximum wanted length of a task repr would be, say, 80 characters, get the reprs of all task arguments, and if the sum length is more than the maximum we can trim the longest ones and suffix with a '...'.
Maybe this restriction shouldn't be applied if python is built in debug mode.
----------
nosy: +kmaork
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39623>
_______________________________________
More information about the Python-bugs-list
mailing list