access modifier (접근지정자)
access modifier (접근지정자) 파이썬에서는 class 변수나 instance 변수를 정의할 때, 기본적으로 public 한 성질을 가지고 있고, protected, private 에 대한 강제성이 없다. 이와 관련된 python 공식문서의 일부분이다. (9.6. Private variables) “Private” instance variables that cannot be accessed except from inside an object don’t exist in Python. However, there is a convention that is followed by most Python code: a name prefixed with an underscore (e.g. _spam) sho..
개발/python-객체지향프로그래밍(OOP)
2022. 5. 27. 23:57