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 gvanrossum, neologix, pitrou
Date 2013-12-02.23:23:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386026617.36.0.593493371888.issue19717@psf.upfronthosting.co.za>
In-reply-to
Content
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')
History
Date User Action Args
2013-12-02 23:23:37pitrousetrecipients: + pitrou, gvanrossum, neologix
2013-12-02 23:23:37pitrousetmessageid: <1386026617.36.0.593493371888.issue19717@psf.upfronthosting.co.za>
2013-12-02 23:23:37pitroulinkissue19717 messages
2013-12-02 23:23:37pitroucreate