8 Dec
2011
8 Dec
'11
7:18 a.m.
On Dec 08, 2011, at 12:08 AM, Chris McDonough wrote:
from __future__ import unicode_literals a = 'foo'
I agree this is an annoying thing to have to change when supporting a dual-Python-version codebase, but it's not the most annoying. print-functions are a little more painful to switch because there's no easy Emacs conversion for them. ;) This one is actually pretty useful because it does make you go through and be very specific about which literals are bytes and which are unicodes. Also, re-adding u'' prefixes doesn't help you much because you might still have byte literals which you have to b'' prefix. Do you really want both 'foo' and u'foo' to be unicode literals? -1 Cheers, -Barry