반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Google Spreadsheet
- gas
- PySpark
- array
- google apps script
- string
- 파이썬
- PANDAS
- Kotlin
- Excel
- math
- c#
- list
- Github
- SQL
- Java
- matplotlib
- django
- PostgreSQL
- hive
- Redshift
- Google Excel
- GIT
- Python
- numpy
- Mac
- Apache
- dataframe
- Tkinter
Archives
- Today
- Total
목록Decorator (1)
달나라 노트
Python Basic : decorator (@)
Python의 decorator라는 것에 대해 알아보겠습니다. Python을 하다보면 아래처럼 @로 시작하는 부분을 볼 수 있습니다. @test_function def sub_func(): print('This is test message.') 이렇게 @(At sign)을 이용하는 것을 decorator라고 합니다. decorator가 뭔지를 먼저 간단하게 말하자면 '기존 함수에 decorator 함수를 추가해서 기존 함수를 장식(decorate)해주는 기능'이라고 할 수 있습니다. 지금은 이게 무슨 말인지 몰라도 됩니다. 한번 예시를 보시죠. def main(): print('main function started') main() -- Result main function started 위 코드를 실행..
Python/Python Basic
2021. 9. 14. 23:23