Message83419
For the common case where list is in fact a sequence of strings, the
used implementation is a lot faster and more efficient than the one you
propose.
Note that the method doesn't pretend to support generators for the list
argument, so adding support for iterators would be a feature request,
not a bug report.
Furthermore, the StreamWriter method can easily be overridden by the
codec's own implementation (the version in codecs.py is the base method
defining the interface and providing a default implementation), so
adding support to the base method will not necessarily mean that all
codecs then support iterators as parameter to .writelines().
IMHO, it's better to use the .write() method in a for-loop of your
application if you want to support iterators that generate a lot of output. |
|
Date |
User |
Action |
Args |
2009-03-10 07:33:37 | lemburg | set | recipients:
+ lemburg, facundobatista, dlesco |
2009-03-10 07:33:37 | lemburg | set | messageid: <1236670417.08.0.916754828364.issue5445@psf.upfronthosting.co.za> |
2009-03-10 07:33:34 | lemburg | link | issue5445 messages |
2009-03-10 07:33:33 | lemburg | create | |
|