[Python-Dev] Python-3.0, unicode, and os.environ (original) (raw)

Bugbee, Larry larry.bugbee at boeing.com
Sat Dec 6 07🔞37 CET 2008


There has been some discussion here that users should use the str or byte function variant based on what is relevant to their system, for example when getting a list of file names or opening a file. That thought process really doesn't do much for those of us that write code that needs to run on any platform type, without alteration or the addition of complex if-statements and/or exceptions.

Whatever the resolution here, and those of you addressing this thorny issue have my admiration, the solution should be such that it gives consistent behavior regardless of platform type and doesn't require the programmer to know of all the minute details of each possible target platform.

That may not be possible for a while, so interim solutions should be such that it minimizes later pain. If that means hiding "implementation details" behind a new function, so be it. Then, at least, the body of one's app is not burdened with this problem later when conditions change.

I'm glad I'm not the only one with hard problems. ;-)

Larry



More information about the Python-Dev mailing list