Am 26.02.2012 07:06, schrieb Nick Coghlan:
On Sun, Feb 26, 2012 at 1:13 PM, Guido van Rossum <guido@python.org> wrote:
A small quibble: I'd like to see a benchmark of a 'u' function implemented in C.
Even if it was quite fast, I don't think such a function would bring the same benefits as restoring support for u'' literals.
You claim that, but your argument doesn't actually support that claim (or I fail to see the argument).
Using myself as an example, my work projects (such as PulpDist [1]) are currently written to target Python 2.6, since that's the system Python on RHEL 6. As a web application, PulpDist has unicode literals *everywhere*, but (as Armin pointed out to me), turning on "from __future__ import unicode_literals" in every file would be incorrect,
Right. So you shouldn't use the __future__ import, but the u() function.
IIRC, I've previously opposed the restoration of unicode literals as a retrograde step. Looking at the implications for the future migration of PulpDist has changed my mind.
Did you try to follow the path of the u() function? Regards, Martin