Why does the .release () platform return "8" in Windows 10?

I run this on my Windows 10 workstation:

import platform
print platform.release()
> 8

I am somewhat puzzled. If the answer was not "10" since I'm on Windows 10?

+4
source share
1 answer

I did digging ...

The problem was resolved for Python 2.7.10 according to its release notes :

  • Problem # 16176: correctly identify Windows 8 through platform.platform ()

However, in Windows 10, you still won’t get the correct answer. For this, a fix was created at the end of September 2015: https://hg.python.org/cpython/rev/2f57270374f7

2.7.10 ( 2015 ), , , . 2.7.11, 2015 .

platform Windows kernel32.dll, .

, ver, Windows, .

EDIT: , Python 2.7.11:

import platform
print platform.release()
> 10
+3

Source: https://habr.com/ru/post/1613786/


All Articles