A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131089.html below:

[Python-Dev] Python3 "complexity"

[Python-Dev] Python3 "complexity" [Python-Dev] Python3 "complexity"Antoine Pitrou solipsis at pitrou.net
Thu Jan 9 13:41:30 CET 2014
On Thu, 9 Jan 2014 10:15:08 +0000
Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
> 
> Moving to python 3, I found that this quickly caused problems.  So, I explicitly added an encoding.  Better guess an encoding, something that is likely, e.g. cp1252
> with open(fn1, encoding='cp1252') as f1:
>     with open(fn2, 'w', encoding='cp1252') as f2:
>         f2.write(process_text(f1.read())

If you don't "care" about the encoding, why don't you use latin1?
Things will roundtrip fine and work as well as under Python 2.

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4