Steve Dower <steve.do...@python.org> added the comment:

> I think all programmers expect that if x == y, then they refer to the same 
> file. This is not true currently.

Perhaps, but you could equally say that they expect that if x != y then they 
refer to different files, which is also not true. So do we optimise for the 
false positive or the false negative? It really depends on what operation you 
are doing, and so it has to be left in the hands of the developer.

Currently, we have a cheap comparison that minimises both without preventing 
either. The only option for PureWindowsPath is to prevent false positives (== 
always means same file), at the cost of causing so many false negatives that I 
suspect most developers would simply roll their own equality comparison. That's 
not the status quo, and especially for a behaviour that has been shipping for a 
few years without significant problems, changing the status quo that 
dramatically requires a more compelling case than has been presented so far.

If there are ways we can reduce the false positives without increasing the 
false negatives, then let's do it. But pragmatically, we should balance both, 
and leave the "perfect" comparisons to other methods.

----------

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

Reply via email to