On Wed, Nov 30, 2011 at 6:31 AM, Yuval Greenfield
<ubershmekel@gmail.com> wrote:
Since we marginally brushed the subject of backwards compatibility damning...
I'm kind of surprised that files do that. Now that I check I'm surprised that StringIO does that.
text = 'asdf\nword'
for item in StringIO(text): != for item in text:
I'm not sure if I like that.
We thought about that. Really. We concluded that while iterating over the characters of a file would be more "pure" but that it would rarely be useful, while iterating over the files would be incredibly useful. That was probably about 10 years ago, and I still think we made the right decision.
--