MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __new__

Method __new__

tools/python-3.11.9-amd64/Lib/pathlib.py:868–875  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

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

Callers 2

_from_partsMethod · 0.45
_from_parsed_partsMethod · 0.45

Calls 1

_from_partsMethod · 0.80

Tested by

no test coverage detected