파이썬 6일차 - 객체 지향 프로그래밍
함수를 활용한 클래스 정의 시뮬레이션
def Person(name, age):
def run(self):
print("{name} is running".format(name=self["name"]))
def init():
return {
"name": name,
"age": age,
"run": run
}
return init()
# 객체 생성 시뮬레 ...
10월 11일 16:36에 게시됨