[Python-Dev] Python-3.0, unicode, and os.environ (original) (raw)
rdmurray at bitdance.com rdmurray at bitdance.com
Mon Dec 8 21:07:16 CET 2008
- Previous message: [Python-Dev] Python-3.0, unicode, and os.environ
- Next message: [Python-Dev] Python-3.0, unicode, and os.environ
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 8 Dec 2008 at 11:25, Guido van Rossum wrote:
On Mon, Dec 8, 2008 at 10:34 AM, <rdmurray at bitdance.com> wrote:
I'm in favor of an option to control what happens.
I just really really don't want the default to be "ignore". Defaulting to a warning is fine with me, as would be defaulting to a traceback. But defaulting to "silently ignore", as we have now, is just asking for user confusion and debugging headaches, as detailed by Toshio. A worse user experience, IMO, than having a program fail when undecodable filenames match the selection criteria. Do you really not care about the risk where apps that weren't written to be prepared to handle this will be rendered completely useless if a single file in a directory has an unencodable name? This is similar to an issue that Python had for a long time where it wouldn't start up if the current directory contained non-ASCII characters.
No, I do care. In another message I agreed with you that having the ap not fail was a reasonable goal. What I'm saying is that having it ignore the undecodable files fail silently is bad. And not picking up a file that matches some selection criteria (ex: *.py) because it is undecodable is a failure, in my opinion, that is worse than getting a traceback because there's an undecodable file in the directory.
But I'm happy with just issuing a warning by default. That would mean it doesn't fail silently, but neither does it crash. Seems like the best compromise with the broken nature of the real world IT environment.
Given that most developers will not have this issue in their own environment, most apps will not be prepared for this issue, and that makes it worse for the app's user!
It is exactly because most developers won't have the issue in their own environment that ignoring files silently is a problem. If they did, they'd fix their code before it went out the door. Since they don't, when their code is used by somebody in a mixed encoding environment, the programs will fail by ignoring files that they should process. The question, it seems to me, is do they fail silently and mysteriously by failing to process files they are supposed to, or do they fail with at least a little bit of noise?
--RDM
- Previous message: [Python-Dev] Python-3.0, unicode, and os.environ
- Next message: [Python-Dev] Python-3.0, unicode, and os.environ
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]