Hello,

pylint does not understand lambda parameters properly
when used as function parameter default values, running
it on the attached file gives:

$ pylint test_pylint_lambda_arg.py
No config file found, using default configuration
************* Module test_pylint_lambda_arg
E:  4:somename.<lambda>: Undefined variable 'x'

see how z is *not* reported as undefined whereas x is...

-- 
Vincent Legoll
"""Test case for pylint bug
"""

def somename(param1=lambda x: x):
    """Pylint reports:
    E:  1:a.<lambda>: Undefined variable 'x'
    """
    print param1('string1')

def othername():
    """Pylint reports nothing for this one
    """
    afuncp = lambda z: z
    print afuncp('string2')
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to