Message205067
I think there's value in allowing the "less strict" behaviour with an optional arg, though. i.e.:
>>> Path('toto').resolve()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/antoine/cpython/default/Lib/pathlib.py", line 1024, in resolve
s = self._flavour.resolve(self)
File "/home/antoine/cpython/default/Lib/pathlib.py", line 282, in resolve
target = accessor.readlink(cur)
File "/home/antoine/cpython/default/Lib/pathlib.py", line 372, in readlink
return os.readlink(path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/antoine/cpython/default/toto'
>>> Path('toto').resolve(strict=False)
PosixPath('/home/antoine/cpython/default/toto') |
|
Date |
User |
Action |
Args |
2013-12-02 23:23:37 | pitrou | set | recipients:
+ pitrou, gvanrossum, neologix |
2013-12-02 23:23:37 | pitrou | set | messageid: <1386026617.36.0.593493371888.issue19717@psf.upfronthosting.co.za> |
2013-12-02 23:23:37 | pitrou | link | issue19717 messages |
2013-12-02 23:23:37 | pitrou | create | |
|