More precise document on os.path.normpath()
lie.1296 at gmail.com
Tue Nov 24 04:57:06 CET 2009
Peng Yu wrote:
> After I tried os.path.normpath(), it is clear that the function
> doesn't return the trailing '/', if the path is a directory. But this
> fact is not documented. Should this be documented in future release of
> Also, I found the documentation of some functions in os.path are not
> clear. I have to try them in order to understand them for corner
> cases. I'm wondering if I can join the people who maintain the
> document to help improve it.
os.path is designed for OS-agnostic path manipulation. The textual
representation of the output of os.path is irrelevant. If a trailing '/'
doesn't affect the ability to open the directory or file or os.path.join
or whatever, it is irrelevant to os.path. If the trailing / does affect
those abilities, though, it is a bug in os.path.
More information about the Python-list