Thomas Viehmann <tv.python....@beamnet.de> added the comment:
Apologies for not being clear. So I wrote: In IPython (or Jupyter), `inspect.getsource` is able to retrieve the source code for functions but not classes. By this I mean: import inspect class X: pass inspect.getsource(X) Note that: - it won't work in the vanilla python interpreter, - it does work for functions in Jupyter/IPython currently, - it works for classes (and functions) in modules. What I would like is to have it work for classes in Jupyter/IPython. By the way: Would a PR be more convenient than a patch? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33826> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com