> Since '' in 'abc' now returns True, How about changing > 'abc'.replace('') to generate '_a_b_c_', too? It is consistent with > re.sub()/subn() and the cost for change is similar to '' in 'abc' > case. Do you have a use case? Or are you just striving for consistency? It would be more consistent but I'm not sure what the point is. I can think of situations where '' in 'abc' would be needed, but not so for 'abc'.replace('', '_'). --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