This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author evaned
Recipients evaned, georg.brandl
Date 2009-09-02.20:35:21
SpamBayes Score 5.5798726e-05
Marked as misclassified No
Message-id <1251923724.11.0.872695091666.issue6825@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for os.path.split says, in part:

  "In nearly all cases, join(head, tail) equals path (the only 
  exception being when there were multiple slashes separating head
  from tail)."

But this is not quite true: that's not the *only* exception, at least
without a somewhat liberal definition of "equals".

This can also happen if os.altsep is used in the path being split, in
which case it will be replaced by os.sep:

>>> import ntpath
>>> path = "a/b"
>>> (head, tail) = ntpath.split(path)
>>> joined = ntpath.join(head, tail)
>>> joined == path
False
>>> joined
'a\\b'


[I only selected the versions that I actually verified, but I would
guess it's present in more.]
History
Date User Action Args
2009-09-02 20:35:24evanedsetrecipients: + evaned, georg.brandl
2009-09-02 20:35:24evanedsetmessageid: <1251923724.11.0.872695091666.issue6825@psf.upfronthosting.co.za>
2009-09-02 20:35:21evanedlinkissue6825 messages
2009-09-02 20:35:21evanedcreate