The str/bytes Nightmare Before the Python 2 EOL

Abstract

Before the EOL of python2, let's reflect one of the most well-known nightmare: str. This talk will analyze the nightmare, and provide the treatment for it. This is the right talk for you if you have encountered UnicodeEncodeError but not knew about the root cause yet. After the talk, you will know the difference between str and bytes in both python2 and python3 and learn the cleaner way to write string.

* This talk will organize many previous PyCon talks with real world supporting python3 experiences.

Description

The talk is a review of **python string** in python2 and python3. The audience is basically expected to learn the string design concept in python, such as the fundamental change of string in python3, and why python2 string design was different. Additionally, audience could learn the best practice to write python string. If you want to learn more before or after, below talks are related to the background: - [Ned Batchelder: Pragmatic Unicode, or, How do I stop the pain?](https://nedbatchelder.com/text/unipain.html) - [Guido van Rossum: BDFL Python 3 retrospective](https://www.youtube.com/watch?v=Oiw23yfqQy8) - [Brett Cannon - How to make your code Python 2/3 compatible - PyCon 2015](https://www.youtube.com/watch?v=KPzDX5TX5HE) - [Writing Python 2/3 compatible code by Edward Schofield](https://www.youtube.com/watch?v=KOqk8j11aAI)

Slides

https://www.slideshare.net/ssuser2cbb78/the-strbytes-nightmare-before-python2-eol

Speaker

Kir Chou

A code monkey builds search services in Amazon jungle. This will be the 3rd year of his presence in PyCon TW.

在亞馬遜做搜索服務的碼猴,今年將會是它出現在PyCon台灣的第三年。