CLASS 를 이해해요
2019. 11. 21. 15:35ㆍPython programming
(1) fuction 과 class 차이
Pascal Case : LikeThis (첫 글자 대문자, 띄어쓰기 없음)
Snake Case : like_this (소문자, 띄어쓰기 언더라인)
(2) Pass
The pass statement is useful if you're building something complex and you want to create a placeholder for a function that you will build out later without causing your code to error.
(3) fuction vs class
While a function can be used with any object,
each class has its own set of methods.
(4) class 안에는 function과 같은 method가 있고, 데이터값과 같은 attribute가 있다
예제)
(4) append 과정을 객체 지향적으로 이해해보자
'Python programming' 카테고리의 다른 글
그래프를 그려요 - matplotlib (0) | 2019.11.25 |
---|---|
Pandas 를 써봐요 (0) | 2019.11.23 |
변수별 freq 만들기 (0) | 2019.11.21 |
format (0) | 2019.11.12 |
Numpy 랑 친해져요 (0) | 2019.11.11 |