[Python-ideas] Python 3 open() text files: make encoding parameter optional for cross-platform scripts

Chris Angelico rosuav at gmail.com
Sun Jun 9 13:24:08 CEST 2013


On Sun, Jun 9, 2013 at 9:09 PM, anatoly techtonik <techtonik at gmail.com> wrote:
> I can not agree with your generic priorities in approach to application
> desing, which are:
> 1. Program should be able to read 3rd-party files produced on the same
> system
> 2. Program should be able to read its own files on any system
>
> My choice is 2 then 1.

#2 is easily achieved: just provide a specific encoding. It's your
program, so you can control what it writes.

ChrisA


More information about the Python-ideas mailing list