[issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method

2013-12-12 Thread Muhammad Tauqir Ahmad
Muhammad Tauqir Ahmad added the comment: Yes I understand your change and other possible changes will fix the reproducer. I am already using a different workaround in my code. The issue is about `inspect.getsource()` having incorrect behavior (or at least inaccurate error message) and

[issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method

2013-12-11 Thread Muhammad Tauqir Ahmad
New submission from Muhammad Tauqir Ahmad: If a method `foo` of object instance `obj` is injected into it using a method from a different object instance, `inspect.getsource(obj.foo)` fails with the error message: TypeError: > is not a module, class, method, function, traceback, frame,