eof

Hrvoje Niksic hniksic at xemacs.org
Thu Nov 22 16:21:59 CET 2007


"Diez B. Roggisch" <deets at nospam.web.de> writes:

>>> Language comparisons are sometimes good. They are best when
>>> they are free of FUD.
>>
>> So why Python's IO cannot yield f.eof() as easily as Ruby's can?  :)
>
> Because that requires buffering, something that affects speed.

I don't get it, Python's files are implemented on top of stdio FILE
objects, which do buffering and provide EOF checking (of the sort
where you can check if a previous read hit the EOF, but still).  Why
not export that functionality?

> 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.

I see no reason why exposing the EOF check would slow things down.



More information about the Python-list mailing list