-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
i think it could be a bug or maybe we just need a PEP but I issue it here
in closure functions we cant redefine a var that has defined before in the parent function
as the normal action I think it should resolve it because is happens normally but when we use it in a
redefinition it doesn't work.
def foo(x: int):
x: int = x * x
def john():
x: int = x + x
return x
return john
error: Unresolved reference 'x'
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error