Nick Coghlan added the comment: I realised that with the "module:qualname" syntax, it's straightforward to expand this beyond module introspection to arbitrary objects.
What I suggest we could output: - a header with key module info (names taken from PEP 451): Origin Cached Submodule search path Loader (repr output) - for non-module objects, also include the line within the file (if it can be determined) - the output of getsource() if a "--source" option is given ---------- title: Make "python -m inspect <name>" dump the source of a module -> Make "python -m inspect <name>" meaningful _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18626> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com