https://github.com/python/cpython
Raw File
Tip revision: 3b9d793efcfd2c00c14ffbeab1a3389bf3b095ff authored by Thomas Wouters on 14 November 2022, 11:12:42 UTC
Python 3.12.0a2
Tip revision: 3b9d793
getversion.c

/* Return the full version string. */

#include "Python.h"

#include "patchlevel.h"

const char *
Py_GetVersion(void)
{
    static char version[250];
    PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s",
                  PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
    return version;
}

// Export the Python hex version as a constant.
const unsigned long Py_Version = PY_VERSION_HEX;
back to top