Skip to content

Static Analysis Glitch #163

Description

@BenMartinAu

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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