Joshua J Cogliati added the comment: Hm. That is a good point. Possibly it could only be done when from __future__ import unicode_literals has been used. For example:
python2 -3 Python 2.7.5 <snip> Type "help", "copyright", "credits" or "license" for more information. >>> type(b"a") == type("a") True >>> from __future__ import unicode_literals >>> type(b"a") == type("a") False >>> b"a" == "a" True >>> b"a" + "a" u'aa' >>> After unicode_literals is used, then b"a" and "a" have a different type and the same code would be an issue in python3: python3 Python 3.3.2 <snip> >>> type(b"a") == type("a") False >>> b"a" == "a" False >>> b"a" + "a" Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't concat bytes to str >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21401> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com