special method
-
Python Class - 5Programming/python 2021. 6. 29. 21:08
Python magic method 혹은 special method라고 불리는 것들이다. 우리는 이미 magic method나 special method를 알고 있다. 왜냐하면 우리가 자주 사용해왔기 때문이다. 결국, 파이썬 내부에 구현된 메소드들을 magic method 혹은 special method라 불린다. magic method의 종류를 보려면 dir 명령어를 이용하며 된다. __로 시작하는 method들이 magic method들이다. dir(int) dir(float)