From 23cadd32b49d103fccc4cd6601ca7b5ab9058b8f Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Fri, 5 Dec 2014 15:15:05 -0800 Subject: 20141205 Python 3 and Unicode --- source/_posts/2014-12-05-python-3-and-unicode.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 source/_posts/2014-12-05-python-3-and-unicode.md (limited to 'source/_posts/2014-12-05-python-3-and-unicode.md') diff --git a/source/_posts/2014-12-05-python-3-and-unicode.md b/source/_posts/2014-12-05-python-3-and-unicode.md new file mode 100644 index 00000000..d7d871d8 --- /dev/null +++ b/source/_posts/2014-12-05-python-3-and-unicode.md @@ -0,0 +1,8 @@ +--- +layout: post +title: "Python 3 and Unicode" +date: 2014-12-05 15:01:54 -0800 +comments: true +categories: +--- +I never realized that in Python 3 Unicode is the default; in particular, `str` in Python 3 is practically equivalent to `unicode` in Python 2. This might be the *one thing* that convince me to migrate. `str.encode()`, `str.decode()`, `unicode.encode()`, `unicode.decode()`, etc. are so confusing that I'm never 100% sure what I'm doing (only-occasionally-used-but-unavoidable-and-worst-of-all-very-confusing "features" are nightmares). -- cgit v1.2.1