D
Diez B. Roggisch
braver said:(Well, TextMate is pretty new, and I've just got a brand new Carbon
Emacs-devel from ports. And tabs don't match in a Python bundle and
the Python mode. Have to fix'em tabs. Chews a fig, mumbles to
himself...![]()
Which is the reason one should use spaces.
So why Python's IO cannot yield f.eof() as easily as Ruby's can?![]()
Because that requires buffering, something that affects speed. Are you
willing to sacrifice the speed for _all_ usecases just for the _few_
that would actually benefit from the eof()? I myself have seldomly found
the need for eof() - but permanently used the generator style of
line-producing files implement.
Considering your own repeated remarks about "I'd only use ruby if it
wasn't slower than Python", I'd think you could value that.
And you have been shown clear, concise solutions to your problem. Which
add the benefit of working in general stream scenarios, not only with
actual files. Granted, they aren't part of the stdlib - but then, lots
of things aren't.
Diez