More precise document on os.path.normpath()
Lie Ryan
lie.1296 at gmail.com
Mon Nov 23 22:57:06 EST 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
> python.
>
> 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
mailing list