Re: [Python-Dev] ImportError on no permission

2007-05-06 Thread Georg Brandl
Martin v. Löwis schrieb: >> Now, why don't we change the semantics as follows: if a file with matching >> name >> exists (in import.c::find_module), but opening fails, ImportError is raised >> immediately with the concrete error message, and without trying the rest of >> sys.path. That shouldn't c

Re: [Python-Dev] ImportError on no permission

2007-05-06 Thread Terry Reedy
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> Now, why don't we change the semantics as follows: if a file with matching name | > exists (in import.c::find_module), but opening fails, ImportError is raised | > immediately with the concrete error message, and

Re: [Python-Dev] ImportError on no permission

2007-05-06 Thread Martin v. Löwis
> How about an ImportWarning instead? That way people can have either > have import halt immediately, or continue (with or without a message). If I put my dislike of warnings aside: yes, that would also work. Martin ___ Python-Dev mailing list Python-D

Re: [Python-Dev] ImportError on no permission

2007-05-06 Thread Brett Cannon
On 5/6/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Now, why don't we change the semantics as follows: if a file with matching name > exists (in import.c::find_module), but opening fails, ImportError is raised > immediately with the concrete error message, and without trying the rest of >

Re: [Python-Dev] ImportError on no permission

2007-05-06 Thread Martin v. Löwis
> Now, why don't we change the semantics as follows: if a file with matching > name > exists (in import.c::find_module), but opening fails, ImportError is raised > immediately with the concrete error message, and without trying the rest of > sys.path. That shouldn't cause any working and sane setu