[Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5 (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Sat Jan 11 00:49:33 CET 2014


On Sat, 11 Jan 2014 00:43:39 +0100 Juraj Sukop <juraj.sukop at gmail.com> wrote:

Basically, to ".encode('ascii')" every possible number is not exactly simple or pretty.

Well it strikes me that the PDF format itself is not exactly simple or pretty. It might be convenient that Python 2 allows you, in certain cases, to "ignore" encoding issues because the main text type is actually a bytestring, but under the Python 3 model there's no reason to allow the same shortcuts.

Also, when you say you've never encountered UTF-16 text in PDFs, it sounds like those people who've never encountered any non-ASCII data in their programs.

Regards

Antoine.



More information about the Python-Dev mailing list