This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

Python 2.x will no longer be supported after 1 Jan 2020. Python 2 reaches end of life in January 2020, and will no longer receive security updates. This page has resources to help with porting applications still running Python 2 to Python 3.

This is a list of suggestions about the migration of Python C extension modules to Python 3.0. Feel free to expand the list!

   1 PyObject_HEAD_INIT(NULL)
   2 0, /* ob_size */

   1 PyVarObject_HEAD_INIT(NULL, 0)

   1 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
   2 

2026-02-14 16:12