This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients dlesco, facundobatista, lemburg
Date 2009-03-10.07:33:33
SpamBayes Score 7.4632245e-11
Marked as misclassified No
Message-id <1236670417.08.0.916754828364.issue5445@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-03-10 07:33:37lemburgsetrecipients: + lemburg, facundobatista, dlesco
2009-03-10 07:33:37lemburgsetmessageid: <1236670417.08.0.916754828364.issue5445@psf.upfronthosting.co.za>
2009-03-10 07:33:34lemburglinkissue5445 messages
2009-03-10 07:33:33lemburgcreate