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

Function python_version

Lib/platform.py:1192–1200  ·  view source on GitHub ↗

Returns the Python version as string 'major.minor.patchlevel' 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

1190 return _sys_version()[0]
1191
1192def python_version():
1193
1194 """ Returns the Python version as string 'major.minor.patchlevel'
1195
1196 Note that unlike the Python sys.version, the returned value
1197 will always include the patchlevel (it defaults to 0).
1198
1199 """
1200 return _sys_version()[1]
1201
1202def python_version_tuple():
1203

Callers 3

show_idlehelpFunction · 0.90
help_about.pyFile · 0.90
test_dialog_titleMethod · 0.90

Calls 1

_sys_versionFunction · 0.85

Tested by 1

test_dialog_titleMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…