불리언 객체¶
파이썬에서 불리언은 정수의 서브 클래스로 구현됩니다. Py_False와 Py_True라는 두 개의 부울만 있습니다. 따라서 일반적인 생성 및 삭제 함수는 부울에 적용되지 않습니다. 그러나 다음 매크로를 사용할 수 있습니다.
- 
PyTypeObject PyBool_Type¶
-  Part of the 안정 ABI.This instance of PyTypeObjectrepresents the Python boolean type; it is the same object asboolin the Python layer.
- 
int PyBool_Check(PyObject *o)¶
- o가 - PyBool_Type형이면 참을 돌려줍니다. 이 함수는 항상 성공합니다.
버전 3.12에서 변경: Py_False is immortal.
버전 3.12에서 변경: Py_True is immortal.