파이썬 globals()

John Jeong (토론 | 기여)님의 2018년 5월 13일 (일) 22:58 판 (→‎참고)

1 개요

Python globals()
  • 글로벌 심볼 테이블을 딕셔너리 형태로 돌려줌
Python 2
Python 2.4.3 (#1, Feb 22 2012, 16:05:45) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> globals()
{'__builtins__': <module '__builtin__' (built-in)>, '__name__': '__main__', '__doc__': None}
Python 3
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> globals()
{'__builtins__': <module 'builtins' (built-in)>, '__name__': '__main__', '__doc__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__package__': None}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}