[Tim Peters] > buf is '' There is question which traversed my mind recently. While I would never use `is' between ordinary strings, I might be tempted to use `is' between explicitely interned strings, under the hypothesis that for example: a = intern('a b') b = intern('a b') a is b dependably prints `True'. However, I remember a thread in this forum by which strings might be un-interned on the fly -- but do not remember the details; I presume it was for strings which the garbage collector may not reach anymore. There are a few real-life cases where speed considerations would invite programmers to use `is' over `==' for strings, given they all get interned to start with so the speed-up could be gleaned later. The fact that `is' exposes the implementation is quite welcome in such cases. -- François Pinard http://www.iro.umontreal.ca/~pinard
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