Currently, a generator or coroutine's repr looks like this: >>> gen <coroutine object f at 0x7f86c9733790> It could instead be something like: >>> gen <coroutine at 0x7f86c9733790, suspended, file "/home/antoine/cpython/default/Lib/logging/__init__.py", line 123, code getLogger> (replace "suspended" with "running" or "closed" depending on the generator's status -- i.e. gi_running and gi_frame attributes)
Isn't it too verbose? For comparison, the repr of function doesn't contain the file path and the line number. And the hexadecimal address in the middle looks distractive.