Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

More precise document on os.path.normpath()

1 view
Skip to first unread message

Peng Yu

unread,
Nov 23, 2009, 8:52:43 PM11/23/09
to pytho...@python.org
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.

Benjamin Kaplan

unread,
Nov 23, 2009, 8:59:39 PM11/23/09
to pytho...@python.org
> --

Just file a bug report listing what part you find unclear and what you
suggest they put to clarify it.

> http://mail.python.org/mailman/listinfo/python-list
>

Carl Banks

unread,
Nov 23, 2009, 9:49:45 PM11/23/09
to
On Nov 23, 5:59 pm, Benjamin Kaplan <benjamin.kap...@case.edu> wrote:

> On Mon, Nov 23, 2009 at 8:52 PM, Peng Yu <pengyu...@gmail.com> 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.
>
> Just file a bug report listing what part you find unclear and what you
> suggest they put to clarify it.

The documentation does not and should not try to document every little
detail of every function.

For that matter, nor should comp.lang.python.

Python is open source, anyone can look at the implementation to see
how it behaves. The source code is the right place to seek answers
about arcane minutae like when os.path.normpath appends a backslash.
Not the Python docuementation, and definitely not this newsgroup.


Carl Banks

Lie Ryan

unread,
Nov 23, 2009, 10:57:06 PM11/23/09
to

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.

0 new messages