diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2014-12-05 15:15:05 -0800 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2014-12-05 15:15:05 -0800 |
commit | 23cadd32b49d103fccc4cd6601ca7b5ab9058b8f (patch) | |
tree | 57adeb6c10f9c60fe6309b48e66616e19b6c8d9b | |
parent | ab39e68bdd8c83dd7ed9256af6a9b38583b4a3d4 (diff) | |
download | my_new_personal_website-23cadd32b49d103fccc4cd6601ca7b5ab9058b8f.tar.xz my_new_personal_website-23cadd32b49d103fccc4cd6601ca7b5ab9058b8f.zip |
20141205 Python 3 and Unicode
Diffstat (limited to '')
-rw-r--r-- | source/_posts/2014-12-05-python-3-and-unicode.md | 8 |
1 files changed, 8 insertions, 0 deletions
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). |