読者です 読者をやめる 読者になる 読者になる

pythonのソースコードを調べる

Objectsフォルダの中身を調べる
それっぽい名前としては

boolobject.c
bytearrayobject.c
bytesobject.c
cellobject.c
classobject.c
codeobject.c
complexobject.c
descrobject.c
dictobject.c
enumobject.c
fileobject.c
floatobject.c
frameobject.c
funcobject.c
genobject.c
iterobject.c
listobject.c
longobject.c
memoryobject.c
methodobject.c
moduleobject.c
namespaceobject.c
object.c
odictobject

object.cの主な関数(?)

void _Py_AddToAllObjects(PyObject op, int force) void Py_IncRef(PyObject o)
void Py_DecRef(PyObject *o)
PyObject * PyObject_Init(PyObject op, PyTypeObject tp)
PyVarObject * PyObject_InitVar(PyVarObject op, PyTypeObject tp, Py_ssize_t size)
PyObject * _PyObject_New(PyTypeObject *tp)
PyVarObject * _PyObject_NewVar(PyTypeObject *tp, Py_ssize_t nitems)
void PyObject_CallFinalizer(PyObject *self)
int PyObject_CallFinalizerFromDealloc(PyObject *self)
int PyObject_Print(PyObject op, FILE fp, int flags)
void _PyObject_Dump(PyObject* op)
PyObject * PyObject_Repr(PyObject *v)
PyObject * PyObject_Str(PyObject *v)
PyObject * PyObject_ASCII(PyObject *v)
PyObject * PyObject_Bytes(PyObject *v)
int _Py_SwappedOp = {Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE};
static char *opstrings = {“<”, “<=”, “==”, “!=”, “>”, “>=”};
static PyObject * do_richcompare(PyObject v, PyObject w, int op)
PyObject * PyObject_RichCompare(PyObject v, PyObject w, int op)
int PyObject_RichCompareBool(PyObject v, PyObject w, int op)
Py_hash_t PyObject_HashNotImplemented(PyObject *v)
Py_hash_t PyObject_Hash(PyObject *v)
PyObject * PyObject_GetAttrString(PyObject v, const char name)
int PyObject_HasAttrString(PyObject v, const char name)
int PyObject_SetAttrString(PyObject v, const char name, PyObject *w)
int _PyObject_IsAbstract(PyObject *obj)
PyObject * PyObject_GetAttrId(PyObject *v, Py_Identifier *name)
int PyObject_HasAttrId(PyObject *v, Py_Identifier *name)
int PyObject_SetAttrId(PyObject *v, Py_Identifier name, PyObject w)
PyObject * PyObject_GetAttr(PyObject v, PyObject name)
int PyObject_HasAttr(PyObject v, PyObject name)
int PyObject_SetAttr(PyObject v, PyObject name, PyObject *value)
PyObject * _PyObject_GetDictPtr(PyObject obj)
PyObject * PyObject_SelfIter(PyObject *obj)
PyObject * _PyObject_GetBuiltin(const char *name)
PyObject * _PyObject_NextNotImplemented(PyObject *self)
PyObject * _PyObject_GenericGetAttrWithDict(PyObject obj, PyObject name, PyObject *dict)
PyObject * PyObject_GenericGetAttr(PyObject obj, PyObject name)
int _PyObject_GenericSetAttrWithDict(PyObject obj, PyObject name, PyObject value, PyObject dict)
int PyObject_GenericSetAttr(PyObject obj, PyObject name, PyObject *value)
int PyObject_GenericSetDict(PyObject obj, PyObject value, void *context)
int PyObject_IsTrue(PyObject *v)
int PyObject_Not(PyObject *v)
int PyCallable_Check(PyObject *x)
static PyObject * _dir_locals(void)
static PyObject * _dir_object(PyObject *obj)
PyObject * PyObject_Dir(PyObject *obj)
static PyObject * none_repr(PyObject *op)
static void none_dealloc(PyObject* ignore)
static PyObject * none_new(PyTypeObject type, PyObject args, PyObject *kwargs)
static int none_bool(PyObject *v)
static PyNumberMethods none_as_number = { 0, / nb_add / 0, / nb_subtract / 0, / nb_multiply / 0, / nb_remainder / 0, / nb_divmod / 0, / nb_power / 0, / nb_negative / 0, / nb_positive / 0, / nb_absolute / (inquiry)none_bool, / nb_bool / 0, / nb_invert / 0, / nb_lshift / 0, / nb_rshift / 0, / nb_and / 0, / nb_xor / 0, / nb_or / 0, / nb_int / 0, / nb_reserved / 0, / nb_float / 0, / nb_inplace_add / 0, / nb_inplace_subtract / 0, / nb_inplace_multiply / 0, / nb_inplace_remainder / 0, / nb_inplace_power / 0, / nb_inplace_lshift / 0, / nb_inplace_rshift / 0, / nb_inplace_and / 0, / nb_inplace_xor / 0, / nb_inplace_or / 0, / nb_floor_divide / 0, / nb_true_divide / 0, / nb_inplace_floor_divide / 0, / nb_inplace_true_divide / 0, / nb_index / };
PyTypeObject _PyNone_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) “NoneType”, 0, 0, none_dealloc, /tp_dealloc/ /never called/ 0, /tp_print/ 0, /tp_getattr/ 0, /tp_setattr/ 0, /tp_reserved/ none_repr, /tp_repr/ &none_as_number, /tp_as_number/ 0, /tp_as_sequence/ 0, /tp_as_mapping/ 0, /tp_hash / 0, /tp_call / 0, /tp_str / 0, /tp_getattro / 0, /tp_setattro / 0, /tp_as_buffer / Py_TPFLAGS_DEFAULT, /tp_flags / 0, /tp_doc / 0, /tp_traverse / 0, /tp_clear / 0, /tp_richcompare / 0, /tp_weaklistoffset / 0, /tp_iter / 0, /tp_iternext / 0, /tp_methods / 0, /tp_members / 0, /tp_getset / 0, /tp_base / 0, /tp_dict / 0, /tp_descr_get / 0, /tp_descr_set / 0, /tp_dictoffset / 0, /tp_init / 0, /tp_alloc / none_new, /tp_new / };
PyObject Py_NoneStruct = { PyObject_EXTRA_INIT 1, &_PyNone_Type };
static PyObject * NotImplemented_repr(PyObject *op)
static PyObject * NotImplemented_reduce(PyObject *op) static PyMethodDef notimplemented_methods[] = { {“reduce”, (PyCFunction)NotImplemented_reduce, METH_NOARGS, NULL}, {NULL, NULL} };
static PyObject * notimplemented_new(PyTypeObject type, PyObject args, PyObject *kwargs)
static void notimplemented_dealloc(PyObject* ignore)
PyTypeObject _PyNotImplemented_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) “NotImplementedType”, 0, 0, notimplemented_dealloc, /tp_dealloc/ /never called/ 0, /tp_print/ 0, /tp_getattr/ 0, /tp_setattr/ 0, /tp_reserved/ NotImplemented_repr, /tp_repr/ 0, /tp_as_number/ 0, /tp_as_sequence/ 0, /tp_as_mapping/ 0, /tp_hash / 0, /tp_call / 0, /tp_str / 0, /tp_getattro / 0, /tp_setattro / 0, /tp_as_buffer / Py_TPFLAGS_DEFAULT, /tp_flags / 0, /tp_doc / 0, /tp_traverse / 0, /tp_clear / 0, /tp_richcompare / 0, /tp_weaklistoffset / 0, /tp_iter / 0, /tp_iternext / notimplemented_methods, /tp_methods / 0, /tp_members / 0, /tp_getset / 0, /tp_base / 0, /tp_dict / 0, /tp_descr_get / 0, /tp_descr_set / 0, /tp_dictoffset / 0, /tp_init / 0, /tp_alloc / notimplemented_new, /tp_new / };
PyObject Py_NotImplementedStruct = { PyObject_EXTRA_INIT 1, &_PyNotImplemented_Type };
void _Py_ReadyTypes(void)
void _Py_NewReference(PyObject *op)
void _Py_ForgetReference(PyObject *op)
void _Py_Dealloc(PyObject *op)
void _Py_PrintReferences(FILE *fp)
void _Py_PrintReferenceAddresses(FILE *fp)
PyObject * _Py_GetObjects(PyObject self, PyObject args)
Py_ssize_t (_Py_abstract_hack)(PyObject ) = PyObject_Size;
void _PyObject_DebugTypeStats(FILE *out)
int Py_ReprEnter(PyObject *obj)
void Py_ReprLeave(PyObject *obj)
int _PyTrash_delete_nesting = 0;
PyObject *_PyTrash_delete_later = NULL;
void _PyTrash_deposit_object(PyObject *op)
void _PyTrash_thread_deposit_object(PyObject *op)
void _PyTrash_destroy_chain(void)
void _PyTrash_thread_destroy_chain(void)
PyAPI_FUNC(void) Py_Dealloc(PyObject *); void Py_Dealloc(PyObject *op)