Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46561 > unrolled thread
| Started by | Skip Montanaro <skip@pobox.com> |
|---|---|
| First post | 2013-05-30 18:43 -0500 |
| Last post | 2013-05-30 18:43 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Surprising difference between StringIO.StringIO and io.StringIO Skip Montanaro <skip@pobox.com> - 2013-05-30 18:43 -0500
| From | Skip Montanaro <skip@pobox.com> |
|---|---|
| Date | 2013-05-30 18:43 -0500 |
| Subject | Re: Surprising difference between StringIO.StringIO and io.StringIO |
| Message-ID | <mailman.2466.1369957812.3114.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
> > I would expect io.StringIO to be a match for the io.* stuff in Python > 3. So it should care whether it is a binary stream or a text stream. > Whereas StringIO.StringIO is your good old Python 2 StringIO, which expects > strs. > > On that basis, io.StringIO is a text stream, expecting Unicode > objects for transcription. 'str' is, in that context, probably > considered as 'bytes' in Python 3. > Thanks. This example was based on a function in Matplotlib. It appears the author switched from StringIO.StringIO to io.StringIO between 1.1 and 1.2. Skip
Back to top | Article view | comp.lang.python
csiph-web