Re: [Python-Dev] The desired behaviour for resolve() when the path doesn't exist

2014年1月07日 12:31:13 -0800

On 2014年1月07日 17:26:20 +0200
Serhiy Storchaka <[email protected]> wrote:
> 
> Behavior of --canonicalize-existing can be derived from --canonicalize, 
> just check that resulting patch exists. But other modes can't be derived 
> from --canonicalize-existing.
> 
> def resolve_existing(path):
> path = path.resolve()
> if not path.exists():
> raise FileNotFoundError(errno.ENOENT, 'No such file or 
> directory: %r' % str(path))
> return path
> 
> So perhaps two main modes should be --canonicalize (default) and 
> --canonicalize-missing (with missing=True)?
That sounds reasonable. And I think strict should be the default.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to