A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-August/091393.html below:

[Python-Dev] deleting setdefaultencoding iin site.py is evil

[Python-Dev] deleting setdefaultencoding iin site.py is evil [Python-Dev] deleting setdefaultencoding iin site.py is evilChris Withers chris at simplistix.co.uk
Thu Aug 27 01:51:51 CEST 2009
exarkun at twistedmatrix.com wrote:
> The ability to change the default encoding is a misfeature.  There's 
> essentially no way to write correct Python code in the presence of this 
> feature.

How so? If every single piece of text in your project is encoded in a 
superset of ascii (such as utf-8), why would this be a problem?
Even if you were evil/stupid and mixed encodings, surely all you'd get 
is different unicode errors or mayvbe the odd strange character during 
display?

> It may be a major task, but the best thing you can do is find each str 
> and unicode operation in the software you're working with and make them 
> correct with respect to your inputs and outputs.  Flipping a giant 
> switch for the entire process is just going to change which things are 
> wrong.

Well, flipping that giant switch has worked in production for the past 5 
years, so I'm afraid I'll respectfully disagree. I'd suspect the 
pragmatics of real world software are with that function even exists, 
and it's extremely useful when used correctly...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
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