Skip to content

no error when name used before defined #11524

Closed
@DetachHead

Description

@DetachHead
foo() # runtime NameError: name 'foo' is not defined

def foo():
    ...

https://mypy-play.net/?mypy=latest&python=3.10&gist=bc5b1e2767072f474d0bdf1ff2a8190e

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-runtime-semanticsmypy doesn't model runtime semantics correctly

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions