Georg Brandl added the comment:
Unfortunately, this is impossible to fix with the current implementation, which
only tokenizes the source. A full parse would be necessary.
Since this is just a minor inconvenience (and there are many situations where
the source cannot be found at all), I'm clo
New submission from Alexey Spiridonov:
This happens because the block search algorithm seems not to be handling lambda
arguments correctly.
$ cat x.py
import inspect
def a(y):
print inspect.getsource(y)
print inspect.getsourcelines(y)
a(
lambda x:
x *
3
)
$ p