> Surely it's desirable under all circumstances that > > len(u) == sum(1 for c in u) > > and that > > [c for c in u] == [c[i] for i in range(*len(u))] > > How would that play under Jeroen's proposed change? Yes, but I think the argument is about what "c" is -- a character or a codepoint. Your point about efficiency is well-taken; I doubt that random access to a particular character in a string has to be efficient -- kind of a dying technique these days -- but slices and regexp performance need efficiency guarantees. Bill
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