[New-bugs-announce] [issue17631] inspect getsource does not display full text of lambda

Alexey Spiridonov report at bugs.python.org
Thu Apr 4 01:13:59 CEST 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue17631>
_______________________________________


More information about the New-bugs-announce mailing list