Context Manager
Context Manager 개념 context manager 란 특정 행동을 할 때 항상 일정한 런타임 환경을 만들어주기 위해 특정 행동에의 진입과 종료를 관리해주는 객체 이다. with 구문을 통해 실행되어, 원하는 타이밍에 정확하게 리소스를 할당하고 제공하는 역할을 한다. (python 공식 document) A context manager is an object that defines the runtime context to be established when executing a [with] statement. The context manager handles the entry into, and the exit from, the desired runtime context for the execu..
개발/python-객체지향프로그래밍(OOP)
2022. 5. 27. 23:57