[issue17631] inspect getsource does not display full text of lambda

2013-10-13 Thread Georg Brandl
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

[issue17631] inspect getsource does not display full text of lambda

2013-04-03 Thread Alexey Spiridonov
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