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 ) $ python x.py lambda x: ([' lambda x:\n'], 8) ---------- components: Library (Lib) messages: 185975 nosy: Alexey.Spiridonov priority: normal severity: normal status: open title: inspect getsource does not display full text of lambda versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17631> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com