Steven D'Aprano added the comment:
This is nothing to do with platform.system. You can see the same behaviour with
any string comparison, or ints.
The `is` operator is not a cute way of spelling `==`, it tests for object
identity, not equality. It tests whether the two arguments are the
Karthikeyan Singaravelan added the comment:
Using "is" could be dependent on how the string is interned to refer to the
same string during comparison for identity. Using == is more reliable and
correct.
--
nosy: +xtreak
___
Python tracker
New submission from Светломир Балевски :
Hi, I am using platform.system(). On linux I am using python3.6.
>>> platform.system()
'Linux'
>>> platform.system() is 'Linux'
False
>>> platform.system() == 'Linux'
True
On Windows with python 3.7:
[10/3/2019 2:42 PM]
>>> platform.system()