On 2/15/06, Alex Martelli <[EMAIL PROTECTED]> wrote: > I agree, or, MAL's idea of bytes.open() and unicode.open() is also > good.
No, the bytes and text data types shouldn't have to be tied to the I/O system. (The latter tends to evolve at a much faster rate so should be isolated.) > My fondest dream is that we do NOT have an 'open' builtin > which has proven to be very error-prone when used in Windows by > newbies (as evidenced by beginner errors as seen on c.l.py, the > python-help lists, and other venues) -- defaulting 'open' to text is > errorprone, defaulting it to binary doesn't seem the greatest idea > either, principle "when in doubt, resist the temptation to guess" > strongly suggests not having 'open' as a built-in at all. Bill Janssen has expressed this sentiment too. But this is because open() *appears* to work for both types to Unix programmers. If open() is *only* usable for text data, even Unix programmers will be using openbytes() from the start. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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/archive%40mail-archive.com