> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com