You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dill.source.getsource is pretty good about getting the source for imported and interactively defined function, lambdas, and class methods. It'd be nice to get the source code for classes and class instances and such. Currently, assumes the inspected object has a func_code attribute.
The text was updated successfully, but these errors were encountered:
getblocks and getsource can grab class code (from file or interpreter) as of e67781b. getblocks can also get the class source for class instances, but not the constructor for the instance. getsource can get the class source and the constructor for instances if there's a nice repr for the instance… otherwise it raises an AttributeError (intentionally). Is this good? Not sure.
dill.source.getsource
is pretty good about getting the source for imported and interactively defined function, lambdas, and class methods. It'd be nice to get the source code for classes and class instances and such. Currently, assumes the inspected object has afunc_code
attribute.The text was updated successfully, but these errors were encountered: