New submission from Antoine Pitrou <pit...@free.fr>:

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)

----------
messages: 309302
nosy: benjamin.peterson, pitrou, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Generator and coroutine repr could be more helpful
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32469>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to