(cls, *args, **kwargs)
| 866 | __slots__ = () |
| 867 | |
| 868 | def __new__(cls, *args, **kwargs): |
| 869 | if cls is Path: |
| 870 | cls = WindowsPath if os.name == 'nt' else PosixPath |
| 871 | self = cls._from_parts(args) |
| 872 | if not self._flavour.is_supported: |
| 873 | raise NotImplementedError("cannot instantiate %r on your system" |
| 874 | % (cls.__name__,)) |
| 875 | return self |
| 876 | |
| 877 | def _make_child_relpath(self, part): |
| 878 | # This is an optimization used for dir walking. `part` must be |
no test coverage detected