More precise document on os.path.normpath()

Discussion in 'Python' started by Peng Yu, Nov 24, 2009.

  1. Peng Yu

    Peng Yu Guest

    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.
     
    Peng Yu, Nov 24, 2009
    #1
    1. Advertising

  2. Peng Yu

    Lie Ryan Guest

    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.
     
    Lie Ryan, Nov 24, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. os.path.normpath

    , Aug 9, 2006, in forum: Python
    Replies:
    4
    Views:
    783
    Dennis Lee Bieber
    Aug 17, 2006
  2. Graham Dumpleton

    Re: os.path.normpath

    Graham Dumpleton, Aug 16, 2006, in forum: Python
    Replies:
    0
    Views:
    381
    Graham Dumpleton
    Aug 16, 2006
  3. placid

    os.path.normpath

    placid, Aug 18, 2006, in forum: Python
    Replies:
    1
    Views:
    1,878
    placid
    Aug 18, 2006
  4. billiejoex

    os.path.normpath bug?

    billiejoex, Jun 14, 2007, in forum: Python
    Replies:
    2
    Views:
    311
    billiejoex
    Jun 14, 2007
  5. Benjamin Kaplan
    Replies:
    1
    Views:
    329
    Carl Banks
    Nov 24, 2009
Loading...

Share This Page