(unicode error) 'unicodeescape' codec can't decode bytes - string with '\u'
问题 Writing my code for Python 2.6, but with Python 3 in mind, I thought it was a good idea to put from __future__ import unicode_literals at the top of some modules. In other words, I am asking for troubles (to avoid them in the future), but I might be missing some important knowledge here. I want to be able to pass a string representing a filepath and instantiate an object as simple as MyObject('H:\unittests') In Python 2.6 , this works just fine, no need to use double backslashes or a raw