# In which file is the PyObject struct defined?

**URL:** <https://discuss.python.org/t/in-which-file-is-the-pyobject-struct-defined/73448>\
**Category:** Python Help\
**Created:** [December 6, 2024, 6:00am UTC](https://discuss.python.org/t/in-which-file-is-the-pyobject-struct-defined/73448 "2024-12-06T06:00:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MercMayhem](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mercmayhem/32/24225_2.png) [@MercMayhem](https://discuss.python.org/u/MercMayhem)\
**Post date:** [December 6, 2024, 6:00am UTC](https://discuss.python.org/t/in-which-file-is-the-pyobject-struct-defined/73448/1 "2024-12-06T06:00:15Z")

</div>

I can’t find where PyObject has been defined.

---

<div class="post-metadata">

**Author:** ![blhsing](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/blhsing/32/25812_2.png) [@blhsing](https://discuss.python.org/u/blhsing)\
**Post date:** [December 6, 2024, 6:16am UTC](https://discuss.python.org/t/in-which-file-is-the-pyobject-struct-defined/73448/2 "2024-12-06T06:16:03Z")

</div>

Here it is:

> <https://github.com/python/cpython/blob/d57f8a9f76e75384ec997686c2a826b1dc3c69c4/Include/pytypedefs.h#L18>

And `struct _object` is defined here:

> <https://github.com/python/cpython/blob/d57f8a9f76e75384ec997686c2a826b1dc3c69c4/Include/object.h#L110>
