Larry Hastings added the comment:

"Special cases aren't special enough to break the rules."  I want the error 
message to mirror the API, which it currently does.  If we swapped them, the 
error message would now contradict the API.  So no, I don't support swapping 
"src" and "dst" in the error message only when the error pertains to os.symlink.

If literally every time the two-filename version of OSError is used inside 
Python, the two filenames are "src" and "dst", then we could consider making it 
slightly more explicit, e.g.

    FileExistsError: [Errno 17] File exists: src='a', dst='a_link'

I think I'd want the source code to reflect this (e.g. thinking about "src" and 
"dst" rather than "filename" and "filename2").

Would OP et al consider this change to the error message an improvement, or is 
it not interesting?

----------

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

Reply via email to