From: Markus M. <ma...@oe...> - 2003-10-05 12:28:13
|
On Sun, 05 Oct 2003, Nicolas Cannasse wrote: > I agree, but if I follow the specification of really_input : > > "Read len characters from the given channel, storing them in string buf, > starting at character number pos. Raise End_of_file if the end of file is > reached before len characters have been read. Raise Invalid_argument > "really_input" if pos and len do not designate a valid substring of buf." > > Then it shouldn't raise any exception. The only possibility for the exception "End_of_file" to occur is when the file somehow gets truncated (= changed) after opening but before/during reading. The function should raise some kind of exception in this case, I think, because the user might be completely surprised about the suddenly shrinking file and should be notified. Of course, this behaviour should be mentioned in the documentation! Regards, Markus -- Markus Mottl http://www.oefai.at/~markus ma...@oe... |