[Python-Dev] Adding 'lexists()' to os.path (original) (raw)
Johannes Gijsbers jlgijsbers at planet.nl
Sun Aug 22 13:08:35 CEST 2004
- Previous message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Next message: [Python-Dev] Adding 'lexists()' to os.path
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Next message: [Python-Dev] Adding 'lexists()' to os.path
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]