> 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/)
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