Skip to content

(유*진, 강의노트 8장) #122

@vnu000

Description

@vnu000
from random import randint

def name():
    print(randint(1, 10))
    randint = 3

name()

randint 함수가 살아있는데도, 파이썬은 실행하기도 전에 이 이름을 지역 변수로 확정 지어서 UnboundLocalError를 내는 것인지 그 우선순위 판단 기준이 궁금합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions