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
- CI
- 백준
- Continuous Deployment
- django
- DjangoRestFramework
- aws
- Git
- dry-yasg
- DjangoCache
- 도커
- Coroutine
- EC2
- Python
- CD
- to_attr
- database
- F객체
- annotate
- Prefetch_related
- nestedfunction
- racecondition
- Continuous Delivery
- apitestcase
- Transaction
- QuerySet
- DRF
- docker
- aggregate
- 코루틴
- testcase
Archives
- Today
- Total
목록nestedfunction (1)
BackEnd King KY

Intro Django 개발자이기전에 Python을 이용하는 개발자로서, 배울 때 가장 헷갈렸던 중첩함수(Nested Function)과 decorator에 대한 포스팅을 해보겠습니다. 중첩함수 함수도 함수안에 중첩하여 사용할 수 있는데, 이를 중첩함수라고 합니다. 중첩함수(내부함수)는 상위부모 함수안에서만 호출 가능합니다. 예를 들어 def parent_function(): def child_function(): return "this is gg" return child_function() print(parent_function()) 이렇게 쓴다면, child_function에서 작성한 print문이 출력되는 것입니다. 그러면 굳이 이렇게 쓰는 이유가 무엇일까요? Why Nested Function? ..
Python
2022. 2. 20. 15:20