On Tue, Jul 27, 2010 at 09:33, <pyt...@bdurham.com> wrote:

> What is the best practice way to open files in Python 2.6+
>
> It looks like there are at least 3 different ways to open files:
> - built-in open()
> - io.open()
> - codecs.open()
>
> It seems like io.open() combines the best of the built-in open() and the
> codecs open(). Am I missing any obvious drawbacks to using io.open() except
> for backwards compatibility?
>
> Thank you,
> Malcolm
>

As an FYI, the builtin open() uses io.open() on at least 3.1 (maybe also
3.0, don't know). I don't know your use cases or what you get or don't get
from any of those options, but the future is io.open.

>>> io.open is open
True
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to