[Leif K-Brooks]
> The obvious workaround is to call buffer.write() with the initial value
> instead of passing it to StringIO's constructor,

More than just a workaround, it is the preferred approach.
That makes is easier to switch to cStringIO where initialized objects are
read-only.



> Is this the
> expected behavior

Yes.



> , and why it isn't mentioned in the docs if so?

Per your request, the docs have been updated.



Raymond Hettinger


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to