R. David Murray <rdmur...@bitdance.com> added the comment:

I haven't looked at this in detail, but here are my general thoughts: I think 
it would be reasonable to expect that the module would function even if the 
file permissions are screwed up, similar to how unix commands that try to read 
.netrc will (try to) function even if its permissions are wrong.  I would, 
however, expect the module to emit a warning in that case.  I'm of two minds 
about the behavior when the caller specifies filenames explicitly.  I could see 
that going either way, but I lean slightly toward making the behavior 
consistent.  While the programmer might appreciate the traceback, the user of 
the program would probably appreciate the "try to keep going" behavior, since 
the filenames provided will often be in the same class of "standard defaults" 
as the existing well known files are, just in the context of that particular 
application.  But like I said, that is just a lean, and I could go the other 
way on this as well :)

I haven't looked at the isflie issue, but it seems reasonable that if the path 
exists we should make sure it is a file before reading it...but perhaps readfp 
will effectively do that?  Write a test and see what happens :)

I don't know whether to call this change a bug fix or a feature, so I guess 
we'd default to feature unless someone can tilt the balance with an argument :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38672>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to