This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Arfrever, berker.peksag, ethan.furman, mark.dickinson, ncoghlan, petr.viktorin, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy, yselivanov
Date 2015-05-23.08:03:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432368223.39.0.4524901628.issue24056@psf.upfronthosting.co.za>
In-reply-to
Content
I've also come to agree with Raymond that the repr may not be the best place for this additional information, and have updated the issue title accordingly.

For example, as one possible alternative, we might be able to put something in the inspect module (e.g. "inspect.callable_info()") that's a higher level alternative to "dis.code_info()".

The information displayed could potentially include:

- the object's repr
- the str() of the callable's signature (presented with the name or qualname if it has one)
- the names and current repr of any captured closure variables

More controversially, it might include an inferred return type annotation when there's no explicit annotation to display (defaulting to "typing.Any", but potentially more explicit if it's possible to tell from the code object flags that calling it will return a Coroutine or Generator)
History
Date User Action Args
2015-05-23 08:03:43ncoghlansetrecipients: + ncoghlan, rhettinger, terry.reedy, mark.dickinson, Arfrever, r.david.murray, petr.viktorin, ethan.furman, berker.peksag, serhiy.storchaka, yselivanov
2015-05-23 08:03:43ncoghlansetmessageid: <1432368223.39.0.4524901628.issue24056@psf.upfronthosting.co.za>
2015-05-23 08:03:43ncoghlanlinkissue24056 messages
2015-05-23 08:03:43ncoghlancreate