On Wed, 01 Dec 2010 09:55:01 -0500 pyt...@bdurham.com wrote: > 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.
That's a good summary, although I'm not sure codecs and io are interchangeable. They will certainly have slightly different behaviour in corner cases. The io module is much more tested since it's the official way to do I/O in Python 3, so its own corner cases are probably better than those in the codecs module :) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list