On Sun, 23 Aug 2009 16:32:09 -0400, Albert Hopkins wrote: > What's different about Python 3 is that there is only unicode strings, > whereas Python 2 has a string type and a unicode type.
Python 2 has "str" (char) and "unicode" (wchar) types. Python 3 has "bytes" (char) and "str" (wchar) types. The main difference is that Python 3 uses unicode "by default", i.e. string literals are unicode rather than byte strings, variables such as sys.argv and os.environ contain unicode strings, etc. There are other differences, e.g.: + Passing a "bytes" object where "str" is expected will raise an exception rather than using an automatic conversion + Subscripting a "bytes" object returns an integer between 0 and 255 + upper(), isalpha(), etc assume ASCII rather than the system encoding -- http://mail.python.org/mailman/listinfo/python-list