Use unicode literals throughout the code base #224

jodal opened this Issue Nov 1, 2012 · 0 comments


None yet

1 participant

jodal commented Nov 1, 2012

We have been quite consistent at using u'abc' literals in the source code, but not in the test code. Sometimes that causes trouble.

Instead of reviewing all code and marking every string with the u prefix, I propose to add the following to the top of all Python source files:

from __future__ import unicode_literals

This way we can remove the u prefix from all strings, and instead add the b prefix the few places where we want to use bytestrings.

This works from Python 2.6 and up, and it will also ease a future migration to Python 3.

@jodal jodal closed this in 6acaa49 Nov 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment