[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values
Yury Selivanov
report at bugs.python.org
Thu Feb 20 18:27:45 EST 2020
Yury Selivanov <yselivanov at gmail.com> added the comment:
> I agree, but wouldn't you agree that some information is better than no information?
We do agree with that. Making it work in the way that does not disturb people when a 10mb bytes string is passed is challenging. We could just cut everything after 100 characters, but it's not an ideal solution either.
> But in case the same task is run many times with different arguments, the task's name by itself doesn't provide very useful information...
So make it useful. You can concatenate critical arguments reprs to task names or make them informative in other way. If you're working with a third-party library that doesn't use task names consider making a PR.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39623>
_______________________________________
More information about the Python-bugs-list
mailing list