MCPcopy Index your code
hub / github.com/python/cpython / home

Method home

Lib/pathlib/__init__.py:1454–1460  ·  view source on GitHub ↗

Return a new path pointing to expanduser('~').

(cls)

Source from the content-addressed store, hash-verified

1452
1453 @classmethod
1454 def home(cls):
1455 """Return a new path pointing to expanduser('~').
1456 """
1457 homedir = os.path.expanduser("~")
1458 if homedir == "~":
1459 raise RuntimeError("Could not determine home directory.")
1460 return cls(homedir)
1461
1462 def as_uri(self):
1463 """Return the path as a URI."""

Callers 4

test_homeMethod · 0.45
test_homeMethod · 0.45
_get_terminfo_dirsFunction · 0.45
display_date_timeFunction · 0.45

Calls 2

expanduserMethod · 0.80
clsClass · 0.50

Tested by 2

test_homeMethod · 0.36
test_homeMethod · 0.36