Skip to content

Static Analysis Glitch #163

Open
@ironstrider

Description

@ironstrider

Static analysis incorrectly detects the following as erroneous (due to erroneous code after return):

In MyPyTutor for CSSE1001: Functionality Programming the follow code is entered:

def add_functions(f,g):
    """ Returns a function that accepts a single argument and returns f(x) + g(x)
    """
    return lambda x: f(x) + g(x)
    add = lambda f,g:f+g
    ​return add

the following error occurs:

Your lambda should only take in a single arg

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions