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

Method __new__

tools/python-3.11.9-amd64/Lib/pathlib.py:469–477  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

_from_partsMethod · 0.80

Tested by

no test coverage detected