Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object.
(cls, *args)
| 467 | ) |
| 468 | |
| 469 | def __new__(cls, *args): |
| 470 | """Construct a PurePath from one or several strings and or existing |
| 471 | PurePath objects. The strings and path objects are combined so as |
| 472 | to yield a canonicalized path, which is incorporated into the |
| 473 | new PurePath object. |
| 474 | """ |
| 475 | if cls is PurePath: |
| 476 | cls = PureWindowsPath if os.name == 'nt' else PurePosixPath |
| 477 | return cls._from_parts(args) |
| 478 | |
| 479 | def __reduce__(self): |
| 480 | # Using the parts tuple helps share interned path parts |
nothing calls this directly
no test coverage detected