@@ -297,17 +297,18 @@ the :mod:`glob` module.) |
297 | 297 |
|
298 | 298 | .. function:: join(path, *paths) |
299 | 299 |
|
300 | | - Join one or more path components intelligently. The return value is the |
301 | | - concatenation of *path* and any members of *\*paths* with exactly one |
302 | | - directory separator following each non-empty part except the last, meaning |
303 | | - that the result will only end in a separator if the last part is empty. If |
304 | | - a component is an absolute path, all previous components are thrown away |
305 | | - and joining continues from the absolute path component. |
306 | | - |
307 | | - On Windows, the drive letter is not reset when an absolute path component |
308 | | - (e.g., ``r'\foo'``) is encountered. If a component contains a drive |
309 | | - letter, all previous components are thrown away and the drive letter is |
310 | | - reset. Note that since there is a current directory for each drive, |
| 300 | + Join one or more path segments intelligently. The return value is the |
| 301 | + concatenation of *path* and all members of *\*paths*, with exactly one |
| 302 | + directory separator following each non-empty part except the last. That is, |
| 303 | + if the last part is empty, the result will end in a separator. If |
| 304 | + a segment is an absolute path (which on Windows requires both a drive and a |
| 305 | + root), then all previous segments are ignored and joining continues from the |
| 306 | + absolute path segment. |
| 307 | + |
| 308 | + On Windows, the drive is not reset when a rooted path segment (e.g., |
| 309 | + ``r'\foo'``) is encountered. If a segment is on a different drive or is an |
| 310 | + absolute path, all previous segments are ignored and the drive is reset. Note |
| 311 | + that since there is a current directory for each drive, |
311 | 312 | ``os.path.join("c:", "foo")`` represents a path relative to the current |
312 | 313 | directory on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\foo`. |
313 | 314 |
|
|