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/2004-August/048208.html below:

[Python-Dev] Adding 'lexists()' to os.path

[Python-Dev] Adding 'lexists()' to os.pathGuido van Rossum guido at python.org
Sun Aug 22 20:58:31 CEST 2004
> I was just reviewing the patch at http://python.org/sf/941486, which
> proposes adding a new 'lexists()' function to os.path. This function
> would return True for dangling symbolic links, unlike
> os.path.exists() which returns False. One could use
> 'os.path.islink(path) or os.path.exists()' as well, but that's two
> stat calls instead of one.
> 
> This function is useful and efficient for fixing a bug in glob.py
> (which the patch does as well) and it seems like it could be useful
> in tarfile.py and tempfile.py as well. Also, a high-quality patch is
> already available. So, any objections to adding this to os.path?

Looks like you already got the go-ahead.  Just make sure with any API
changes/additions to os.path, that there are many individual *path
modules that need to be updated -- if a platform doesn't support
symlinks, lexists() should probably just be an alias for exists().

posixpath.py, ntpath.py, macpath.py, os2emxpath.py.

--Guido van Rossum (home page: http://www.python.org/~guido/)
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