
Aug. 22, 2004
11:08 a.m.
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? Johannes