Antoine Pitrou <pit...@free.fr> added the comment:

Hmm, thanks for taking the time of proposing this and submitting a PR, but no.  
The documentation for `abs()` states:
"""
Return the absolute value of a number. The argument may be an integer or a 
floating point number. If the argument is a complex number, its magnitude is 
returned.
"""

This is all about numbers. Not about filesystem paths or any other kind of 
object. It's true that Path overrides the "division" operator, but that's an 
exception meant to make it easy to write a very common operation on paths (path 
joining), and because some people felt it looked pleasantly like the standard 
Unix path separator (it wasn't the initial choice, by the way).  No such 
argument applies in favour of abs(Path).

Moreover, Path.resolve() is strongly recommended over Path.absolute(), which 
currently isn't even exposed in the docs (though it seems that doesn't prevent 
people from actually using it ;-)).

----------

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

Reply via email to