]> granicus.if.org Git - python/commit
asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 12 Jun 2014 16:39:26 +0000 (18:39 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 12 Jun 2014 16:39:26 +0000 (18:39 +0200)
commit307bccc6ff6670c58f4c20421a29071ff710e6a3
treee165b2e33505bcece03948112ca230af5d2d2688
parentf54432e2a16d445ed6fa142a9c5d8d23b11780b2
asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)

repr(Handle) is shorter for function: "foo" instead of "<function foo at
0x...>". It now also includes the source of the callback, filename and line
number where it was defined, if available.

repr(Task) now also includes the current position in the code, filename and
line number, if available. If the coroutine (generator) is done, the line
number is omitted and "done" is added.
Lib/asyncio/events.py
Lib/asyncio/tasks.py
Lib/asyncio/test_utils.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_tasks.py