A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/130984.html below:

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

[Python-Dev] The desired behaviour for resolve() when the path doesn't exist [Python-Dev] The desired behaviour for resolve() when the path doesn't existAntoine Pitrou solipsis at pitrou.net
Tue Jan 7 21:28:41 CET 2014
On Tue, 07 Jan 2014 17:26:20 +0200
Serhiy Storchaka <storchaka at gmail.com> 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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4