Re: cStringIO unicode weirdness

2007-06-18 Thread Paul Rubin
Josiah Carlson <[EMAIL PROTECTED]> writes: > You would be wrong. The behavior of StringIO and cStringIO are > different under certain circumstances, and those differences are > intended. Among them is when they are confronted with unicode, as you > saw. Another is when provided with an initializ

Re: cStringIO unicode weirdness

2007-06-18 Thread Josiah Carlson
Paul Rubin wrote: > Python 2.5 (r25:51908, Oct 6 2006, 15:24:43) > [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import StringIO, cStringIO > >>> StringIO.StringIO('a').getvalu

Re: cStringIO unicode weirdness

2007-06-18 Thread John Machin
On Jun 19, 8:56 am, Paul Rubin wrote: > Python 2.5 (r25:51908, Oct 6 2006, 15:24:43) > [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import StringIO, cSt

cStringIO unicode weirdness

2007-06-18 Thread Paul Rubin
Python 2.5 (r25:51908, Oct 6 2006, 15:24:43) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import StringIO, cStringIO >>> StringIO.StringIO('a').getvalue() 'a' >>> cStringI