리플렉션¶
-
PyObject*
PyEval_GetBuiltins()¶ - Return value: Borrowed reference.
현재 실행 프레임이나 현재 실행 중인 프레임이 없으면 스레드 상태의 인터프리터의 builtins의 딕셔너리를 반환합니다.
-
PyObject*
PyEval_GetLocals()¶ - Return value: Borrowed reference.
Return a dictionary of the local variables in the current execution frame, or
NULLif no frame is currently executing.
-
PyObject*
PyEval_GetGlobals()¶ - Return value: Borrowed reference.
Return a dictionary of the global variables in the current execution frame, or
NULLif no frame is currently executing.
-
PyFrameObject*
PyEval_GetFrame()¶ - Return value: Borrowed reference.
Return the current thread state’s frame, which is
NULLif no frame is currently executing.
-
int
PyFrame_GetLineNumber(PyFrameObject *frame)¶ frame이 현재 실행 중인 줄 번호를 반환합니다.
-
const char*
PyEval_GetFuncName(PyObject *func)¶ func가 함수, 클래스 또는 인스턴스 객체면 func의 이름을 반환하고, 그렇지 않으면 func의 형의 이름을 반환합니다.
-
const char*
PyEval_GetFuncDesc(PyObject *func)¶ func의 형에 따라 설명 문자열을 반환합니다. 반환 값에는 함수 및 메서드의 “()”, ” constructor”, ” instance” 및 ” object” 가 포함됩니다.
PyEval_GetFuncName()의 결과와 이어붙이면 func의 설명이 됩니다.
