[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values
Andrew Svetlov
report at bugs.python.org
Thu Feb 20 15:50:19 EST 2020
Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:
Not so easy to find a satisfactory generic approach.
An argument can also be 10 MiB length bytes array, a dictionary with 10,000 elements, HTML page, name it.
All these objects are printable but their representation is too verbose.
Task can have a dozen of arguments, only the latest may be meaningful for logically separating one task from others.
Task has a name exactly for the purpose of distinguishing similar but different tasks, please use it. Only the task creator knows how to name it better.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39623>
_______________________________________
More information about the Python-bugs-list
mailing list