'Can I override u-strings (u'example') in Python 2?

In debugging upgrading to Python 3, it would be useful to be able to override the u'' string prefix to call my own function or replace with a non-u string.

I've tried things like unichr = chr which is useful for my debugging but doesn't accomplish the above.

module.uprefix = str is the type of solution I'm looking for.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source