os.path.normpath bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • billiejoex

    #1

    os.path.normpath bug?

    Hi there,
    I've noticed that os.path.normpat h does not collapse redundant
    separators if they're located at the beginning of the string:
    >>print os.path.normpat h('/a//b//c')
    \a\b\c
    >>print os.path.normpat h('//a//b//c')
    \\a\b\c

    Is it intentional or is it a bug?

  • Michael Hoffman

    #2
    Re: os.path.normpat h bug?

    billiejoex wrote:
    Hi there,
    I've noticed that os.path.normpat h does not collapse redundant
    separators if they're located at the beginning of the string:
    >
    >>>print os.path.normpat h('/a//b//c')
    \a\b\c
    >>>print os.path.normpat h('//a//b//c')
    \\a\b\c
    >
    Is it intentional or is it a bug?
    Intentional.


    --
    Michael Hoffman

    Comment

    • billiejoex

      #3
      Re: os.path.normpat h bug?

      On 14 Giu, 22:35, Michael Hoffman <cam.ac...@mh39 1.invalidwrote:
      Intentional.
      >
      http://en.wikipedia.org/wiki/Path_(c..._Naming_Conven...
      --
      Michael Hoffman
      Got it.
      Thank you.


      Comment

      Working...