> Here is a real life example where "is" on immutable objects is very > helpful for perfomance reasons I apreciate that 'is' is faster than '==' for comparing two strings of length 500, but have you tried to measure how much time you are saving in your application? I doubt it's in the noise. And unless the intern()ed strings are compared over and over, the cost of intern() is mroe than the savings in comparison. (The best scheme is probably to use intern() but still use '==' for comparisons; '==' is smart enough to skip comparing an object to itself.) --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4