[New-bugs-announce] [issue19717] resolve() fails when the path doesn't exist

Antoine Pitrou report at bugs.python.org
Fri Nov 22 18:45:53 CET 2013


New submission from Antoine Pitrou:

Currently Path.resolve() raises FileNotFoundError when the path does not exist. Guido pointed out that it may more useful to resolve the path components until one doesn't exist, and then return the rest unchanged.

e.g. if /home/ points to /var/home/, Path("/home/antoine/toto") should resolve to Path("/var/home/antoine/toto") even if toto doesn't actually exist.

However, this makes the function less safe. Perhaps with a "strict" flag?

----------
components: Library (Lib)
messages: 203819
nosy: gvanrossum, neologix, pitrou
priority: normal
severity: normal
status: open
title: resolve() fails when the path doesn't exist
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19717>
_______________________________________


More information about the New-bugs-announce mailing list