Skip to content

Returning Undefined value doesn't get flagged as error #551

Closed

Description

@gvanrossum

This gets no errors:

def words(s: str) -> Dict[str, int]:
    x = Undefined(Dict[str, int])
    return x

Shouldn't it be an error to return an undefined value?

Activity

  1. JukkaL commented on Jan 8, 2015

    @JukkaL
    Collaborator

    Yeah, it would be good to track undefined values and flag an error at least if a program definitely uses an undefined value. This can be implemented using some fairly simple data flow analysis.

  2. JukkaL commented on May 17, 2015

    @JukkaL
    Collaborator

    We are getting rid of Undefined so this is no longer relevant.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions