셀 객체¶
“Cell” objects are used to implement variables referenced by multiple scopes. For each such variable, a cell object is created to store the value; the local variables of each stack frame that references the value contain a reference to the cells from outer scopes which also use that variable. When the value is accessed, the value contained in the cell is used instead of the cell object itself. This de-referencing of the cell object requires support from the generated byte-code; these are not automatically de-referenced when accessed. Cell objects are not likely to be useful elsewhere.
-
type PyCellObject¶
셀 객체에 사용되는 C 구조체.
-
PyTypeObject PyCell_Type¶
셀 객체에 해당하는 형 객체.
-
PyObject *PyCell_Get(PyObject *cell)¶
- 반환값: 새 참조.
셀 cell의 내용을 반환합니다. cell은
NULL일 수 있습니다. cell이 셀 객체가 아니면,NULL을 반환하고 예외를 설정합니다.
-
PyObject *PyCell_GET(PyObject *cell)¶
- 반환값: 빌린 참조.
셀 cell의 내용을 반환하지만, cell이
NULL이 아닌지와 셀 객체인지를 확인하지 않습니다.