John Nagle <[EMAIL PROTECTED]> writes:
> If you want to force [an error while closing a file], write to
> a drive reached over a network, or a removable medium like a floppy
> or flash card. Open a file for writing and disconnect the network
> or remove the removable medium.
Or simply use a
On Mar 20, 4:26 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] a écrit :
>
>
>
> > On Mar 20, 12:25 pm, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
>
> >>Closing a file can (I believe) raise an exception. Is that documented
> >>anywhere? I've spent a lot of frustrating ti
[EMAIL PROTECTED] a écrit :
> On Mar 20, 12:25 pm, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>
>>Closing a file can (I believe) raise an exception. Is that documented
>>anywhere? I've spent a lot of frustrating time trying to track this down,
>>with no luck, which suggests that either my google
Ross Ridge wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>>Closing a file can (I believe) raise an exception. Is that documented
>>anywhere?
>
>
> In a catch-all statement for file objects: "When a file operation fails
> for an I/O-related reason, the exception IOError is raised." The
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>Closing a file can (I believe) raise an exception. Is that documented
>anywhere?
In a catch-all statement for file objects: "When a file operation fails
for an I/O-related reason, the exception IOError is raised." The fact
that close() is a file opera
On Mar 20, 12:25 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> Closing a file can (I believe) raise an exception. Is that documented
> anywhere? I've spent a lot of frustrating time trying to track this down,
> with no luck, which suggests that either my google-foo is weak or that it
> isn't doc
Closing a file can (I believe) raise an exception. Is that documented
anywhere? I've spent a lot of frustrating time trying to track this down,
with no luck, which suggests that either my google-foo is weak or that it
isn't documented. Is IOError the only exception it can raise?
The only thing I h