[Barry, on '' in 'xyz'] > Is the nothing part of the everything? That's right, and if Python is a programming language for mystics that's clearly the best answer <wink>. > I'm not sure what the natural interpretation should be, s1 in s2 if and only if there exists an int i such that s2[i : i+len(s1)] == s1 is the acade^H^H^H^H^Hmystic meaning, and that's true of every i in -sys.maxint .. sys.maxint when s1 is empty. > but why would you ever want to know if '' is in somestring? That's the practical rub indeed. You never want to know that, so if you end up asking it it's almost certainly a logic error in preceding code. > Usually I think you'd only want to know if '' == somestring, so perhaps > we should break the symmetry here. That is the question.
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