[issue34614] Builtin `abs(Path)` returns `Path.absolute()`.
Brandt Bucher
report at bugs.python.org
Sun Sep 9 11:47:39 EDT 2018
New submission from Brandt Bucher <brandtbucher at gmail.com>:
This complements the current Path behavior that overrides division operators for path joining, in that it makes manually-constructed paths easier to form and arguably more readable.
Before:
p = Path("some", "relative", "path")
q = p.absolute() / "some" / "further" / "path"
After:
p = Path("some", "relative", "path")
q = abs(p) / "some" / "further" / "path"
----------
components: Library (Lib)
messages: 324890
nosy: brandtbucher
priority: normal
severity: normal
status: open
title: Builtin `abs(Path)` returns `Path.absolute()`.
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34614>
_______________________________________
More information about the Python-bugs-list
mailing list