Python Unicode strings and the Python interactive interpreter
问题 I'm trying to understand how python 2.5 deals with unicode strings. Although by now I think I have a good grasp of how I'm supposed to handle them in code, I don't fully understand what's going on behind the scenes, particularly when you type strings at the interpreter's prompt. So python pre 3.0 has two types for strings, namely: str (byte strings) and unicode , which are both derived from basestring . The default type for strings is str . str objects have no notion of their actual encoding,