반응형
python 공식 Document의 내용에 따르면 정의는 다음과 같다.
super([type[, object-or-type]])
Return a proxy object that delegates method calls to a parent or sibling class of type. This is useful for accessing inherited methods that have been overridden in a class. The search order is same as that used by getattr() except that the type itself is skipped.
프록시 객체를 반환한다. 이것은 부모 또는 형재 클래스에게 메소드 콜을 위임한다. 이것은 클래스에서 재 정의 된, 상속 메소드에 엑세스 할 때 유용하다. 검색 순서는 getattr ()이 사용하는 검색 순서와 동일하지만 type 자체는 제외한다.
#자식클래스에서 부모 클래스의 내용을 사용할 수 있다.
출처
파이썬 공식 문서:https://docs.python.org/3/library/functions.html?highlight=super#super
파이썬으로 배우는 웹 크롤러(서적)
반응형
'파이썬' 카테고리의 다른 글
[Python] 파이썬의 특징 (0) | 2022.03.15 |
---|---|
[Python] Matplotlib 소개 및 예시 (0) | 2020.06.02 |
파이썬(python)을 통한 데이터 수집 (0) | 2019.04.05 |
파이썬(python) 파일(file) 다루기 (0) | 2019.04.04 |
파이썬(python) 로깅(logging) 모듈이란? (0) | 2019.04.02 |
댓글