Le 28/06/2011 16:46, Paul Moore a écrit : > > -1. This will make things harder for simple scripts which are not > intended to be cross-platform. > +1 to all you said. I frequently use the python command prompt or "python -c" for various quick tasks (mostly on linux). I would hate to replace my ugly, but working >>> open('example.txt').read() with the unnecessarily verbose >>> open('example.txt',encoding='utf-8').read() When using python that way as a "swiss army knife", typing does matter. My preferred solution would be: >> - emit a warning if the encoding argument is not set By the way, I just thought that for real programming, I would love to have a -Wcrossplatform command switch, which would warn for all unportable constructs in one go. That way, I don't have to remember which parts of 'os' wrap posix-only functionnality. Baptiste
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