Closed pzmarzly closed 5 years ago
Comparing strings using is is like comparing char pointers in C - may work for constant string literals, but usually returns false. More info: https://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce
is
$ python3 >>> from platform import system >>> system() == 'Linux' True >>> system() is 'Linux' False
Merged in https://github.com/rmst/yoke/commit/a2c6cd3b681604b64a3a8c84656b3dc61b900b37
Ah damn, only saw this now. Should have merged this instead.
Comparing strings using
is
is like comparing char pointers in C - may work for constant string literals, but usually returns false. More info: https://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce