리플렉션¶
-
PyObject *
PyEval_GetBuiltins(void)¶ - Return value: Borrowed reference. Part of the Stable ABI.
현재 실행 프레임이나 현재 실행 중인 프레임이 없으면 스레드 상태의 인터프리터의 builtins의 딕셔너리를 반환합니다.
-
PyObject *
PyEval_GetLocals(void)¶ - Return value: Borrowed reference. Part of the Stable ABI.
현재 실행 프레임의 지역 변수 딕셔너리를 반환하거나, 현재 실행 중인 프레임이 없으면
NULL을 반환합니다.
-
PyObject *
PyEval_GetGlobals(void)¶ - Return value: Borrowed reference. Part of the Stable ABI.
현재 실행 프레임의 전역 변수 딕셔너리를 반환하거나, 현재 실행 중인 프레임이 없으면
NULL을 반환합니다.
-
PyFrameObject *
PyEval_GetFrame(void)¶ - Return value: Borrowed reference. Part of the Stable ABI.
현재의 스레드 상태의 프레임을 반환합니다. 현재 실행 중의 프레임이 없으면
NULL입니다.PyThreadState_GetFrame()도 참조하십시오.
-
PyFrameObject *
PyFrame_GetBack(PyFrameObject *frame)¶ frame 다음 외부 프레임을 가져옵니다.
Return a strong reference, or
NULLif frame has no outer frame.frame은
NULL이 아니어야 합니다.버전 3.9에 추가.
-
PyCodeObject *
PyFrame_GetCode(PyFrameObject *frame)¶ - Part of the Stable ABI since version 3.10.
frame 코드를 가져옵니다.
Return a strong reference.
frame은
NULL이 아니어야 합니다. 결과(프레임 코드)는NULL일 수 없습니다.버전 3.9에 추가.
-
int
PyFrame_GetLineNumber(PyFrameObject *frame)¶ - Part of the Stable ABI since version 3.10.
frame이 현재 실행 중인 줄 번호를 반환합니다.
frame은
NULL이 아니어야 합니다.
-
const char *
PyEval_GetFuncName(PyObject *func)¶ - Part of the Stable ABI.
func가 함수, 클래스 또는 인스턴스 객체면 func의 이름을 반환하고, 그렇지 않으면 func의 형의 이름을 반환합니다.
-
const char *
PyEval_GetFuncDesc(PyObject *func)¶ - Part of the Stable ABI.
func의 형에 따라 설명 문자열을 반환합니다. 반환 값에는 함수 및 메서드의 “()”, ” constructor”, ” instance” 및 ” object” 가 포함됩니다.
PyEval_GetFuncName()의 결과와 이어붙이면 func의 설명이 됩니다.