The confusion for me is why is type(e) of type str, and not unicode?and type(e) would be the same (unicode), but they are not.My intuition would lead me to believe that type(b)type(f) == unicodetype(e) == strtype(d) == strtype(c) == unicodetype(b) == unicodec = u"%s" % "hi"b = "%s" % u"hi"a = "%s" % "hi"Python 2.7I switched some code to use str.format(), I found this behavor:Hi,While cleaning up some code during Python 2 -> Python 3 porting,
=========d = "{}".format("hi")e = "{}".format(u"hi")f = u"{}".format("hi")type(a) == strCan someone clarify this for me?I understand that in Python 3, all these cases are str, so it is notas big a problem there, but I am trying to keep things working onPython 2.7.Thanks.--Craig
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/ hobsonlane%40gmail.com