항상 감사하며 마633

고정 헤더 영역

글 제목

메뉴 레이어

항상 감사하며 마633

메뉴 리스트

  • 홈
  • 태그
  • 방명록
  • 분류 전체보기 (93)
    • 개발 (59)
      • 개발환경설정 (6)
      • python-심화(Advanced) (23)
      • python-객체지향프로그래밍(OOP) (21)
      • python-병렬처리 (7)
      • python-속도향상(optimization) (2)
    • Study (16)
      • DeepLearning from scratch (16)
    • paper review (15)
      • NLP (15)
    • Google Machine Learning Boo.. (3)

검색 레이어

항상 감사하며 마633

검색 영역

컨텐츠 검색

변수범위

  • 변수 범위 variable scope (python)

    2022.05.17 by Matthew0633

  • 클로저 (Closure) (2) - 클로저 개념 및 구현

    2022.05.09 by Matthew0633

변수 범위 variable scope (python)

앞서 병렬처리 부분에서 클로저의 개념을 다루기 전에 변수 범위를 간단하게 다루었는데, 이번에 본격적으로 개념을 정리하고자 한다 전역변수 전역변수는 주로 변하지 않는 상수값 또는 고정값을 가진 변수로 사용하는 것이 일반적이다 a = 10 # Global variable def foo(): # Read global variable print(a) foo() # 10 print(a) # 10 지역변수 지역변수는 함수 내에 로직 해결에 국한되고, 함수 실행 해제 시 소멸되는 특징을 가진다 따라서, 용도와 다르게 global keyword 를 활용하여 전역변수를 지역내에서 수정하는 것은 권장되지 않고 있다 (아래에서 global keyword 에 대해 정리하였다) b = 20 def bar(): b = 30 # ..

개발/python-심화(Advanced) 2022. 5. 17. 23:32

클로저 (Closure) (2) - 클로저 개념 및 구현

클로저 (Closure) (Closure in Wiki) In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions. Operationally, a closure is a record storing a function[a] together with an environment.[1] The environment is a mapping associating each free variable of the function (variables that..

개발/python-병렬처리 2022. 5. 9. 23:17

추가 정보

인기글

최신글

페이징

이전
1
다음
TISTORY
항상 감사하며 마633 © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바