The cStringIO
is an optional module, which contains a faster implementation of the
StringIO
module. It works exactly like the StringIO
module, but it
cannot be subclassed. Example 2-11 shows how cStringIO
is used.
To make your code as fast as possible, but also robust enough to run
on older Python installations, you can fall back on the
StringIO
module if cStringIO
is
not available, as Example 2-12 does.
3.133.158.32