This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brandtbucher, pitrou
Date 2018-09-09.17:13:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536513184.4.0.56676864532.issue34614@psf.upfronthosting.co.za>
In-reply-to
Content
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 ;-)).
History
Date User Action Args
2018-09-09 17:13:04pitrousetrecipients: + pitrou, brandtbucher
2018-09-09 17:13:04pitrousetmessageid: <1536513184.4.0.56676864532.issue34614@psf.upfronthosting.co.za>
2018-09-09 17:13:04pitroulinkissue34614 messages
2018-09-09 17:13:04pitroucreate