Re:Python strings are immutable, but only sometimes
by mannerheim on Tuesday February 16, 2021 @12:58AM
(#26151355)
You could use '== None' instead, but it's generally recommended to use 'is None' (supposedly this is slightly faster). I don't think I've ever encountered anything else relying on 'is'. IMO the 'is' keyword was a poor language decision, given how rarely it's ever used.
[ Parent
| on HN ]
Re:Python strings are immutable, but only sometimes
by mannykannot on Tuesday February 16, 2021 @07:35AM
(#26153292)
I agree. 'is' creates opportunities for possibly counter-intuitive implementation dependency, for very little gain.