[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] Possible changes to handling of default encoding
From: "M.-A. Lemburg" <mal () egenix ! com>
Date: 2010-01-26 10:45:42
Message-ID: 4B5EC7D6.2040901 () egenix ! com
[Download RAW message or body]
Nick Coghlan wrote:
> Tres Seaver wrote:
>>> Perhaps we could also add a warning to the open() API which warns
>>> in case a file is opened in text mode without specifying an
>>> encoding ?!
>>
>> That sounds like a good plan to me, given that backward-compatibility
>> requires keeping the guessing enabled by default.
>
> Perhaps a switch along the lines of -t and -tt (warnings/errors for
> mixing tabs and spaces)?
>
> So by default Python continues to guess based on the locale encoding
> (perhaps with a PYTHONTEXTENCODING to override the locale specifically
> for Python).
Right (that's why I suggested a few messages ago :-).
> Then -T might warn whenever a text file encoding is guessed rather than
> specified and -TT might raise an error.
I was thinking more along the lines of a deprecation warning,
but a command line option is good as well.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jan 26 2010)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic