True if the path is absolute (has both a root and, if applicable, a drive).
(self)
| 503 | return other == self or other in self.parents |
| 504 | |
| 505 | def is_absolute(self): |
| 506 | """True if the path is absolute (has both a root and, if applicable, |
| 507 | a drive).""" |
| 508 | if self.parser is posixpath: |
| 509 | # Optimization: work with raw paths on POSIX. |
| 510 | for path in self._raw_paths: |
| 511 | if path.startswith('/'): |
| 512 | return True |
| 513 | return False |
| 514 | return self.parser.isabs(self) |
| 515 | |
| 516 | def is_reserved(self): |
| 517 | """Return True if the path contains one of the special names reserved |