When to use codecs vs. io module (Python 2.7 and higher)

python at bdurham.com python at bdurham.com
Wed Dec 1 09:55:01 EST 2010


Python 2.7 or higher: Looking for reasons/scenarios where one
should use the codecs vs. io module.

Are there use cases that favor one specific module over the other
module?

My understanding is that the io module is much faster than the
codecs module (and can be used interchangably), but the codecs
module provides backward compatibility if you need to target
versions of Python less than 2.6.

Thank you,
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101201/e9dad5c5/attachment-0001.html>


More information about the Python-list mailing list