MCPcopy Index your code
hub / github.com/python/cpython / python_version_tuple

Function python_version_tuple

Lib/platform.py:1202–1211  ·  view source on GitHub ↗

Returns the Python version as tuple (major, minor, patchlevel) of strings. Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0).

()

Source from the content-addressed store, hash-verified

1200 return _sys_version()[1]
1201
1202def python_version_tuple():
1203
1204 """ Returns the Python version as tuple (major, minor, patchlevel)
1205 of strings.
1206
1207 Note that unlike the Python sys.version, the returned value
1208 will always include the patchlevel (it defaults to 0).
1209
1210 """
1211 return tuple(_sys_version()[1].split('.'))
1212
1213def python_branch():
1214

Callers

nothing calls this directly

Calls 2

_sys_versionFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…