➜

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.

作者 dlesco
收信人 dlesco, facundobatista, lemburg
日期 2009-03-10.15:36:40
SpamBayes Score 1.5703656e-05
Marked as misclassified 否
Message-id <1236699401.94.0.646854639239.issue5445@psf.upfronthosting.co.za>
In-reply-to
内容
Let me give an example of why it's important that writelines 
iteratively writes.  For:

rows = (line[:-1].split('\t') for line in in_file)
projected = (keep_fields(row, 0, 3, 7) for row in rows)
filtered = (row for row in projected if row[2]=='1')
out_file.writelines('\t'.join(row)+'\n' for row in filtered)

For a large input file, for a regular out_file object, this will work. 
For a codecs.StreamWriter wrapped out_file object, this won't work, 
because it's not following the file protocol that writelines should 
iteratively write.
历史
日期 用户 动作 参数
2009-03-10 15:36:42dlesco修改recipients: + dlesco, lemburg, facundobatista
2009-03-10 15:36:41dlesco修改messageid: <1236699401.94.0.646854639239.issue5445@psf.upfronthosting.co.za>
2009-03-10 15:36:40dlesco链接issue5445 messages
2009-03-10 15:36:40dlesco创建