Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ _normalize_uri
Function
_normalize_uri
Lib/dbm/sqlite3.py:29–34 ·
view source on GitHub ↗
(path)
Source
from the content-addressed store, hash-verified
27
28
29
def
_normalize_uri(path):
30
path = Path(path)
31
uri = path.absolute().as_uri()
32
while
"//"
in uri:
33
uri = uri.replace(
"//"
,
"/"
)
34
return
uri
35
36
37
class
_Database(MutableMapping):
Callers
3
test_uri_substitutions
Method · 0.90
test_uri_windows
Method · 0.90
__init__
Method · 0.85
Calls
4
absolute
Method · 0.95
Path
Class · 0.90
as_uri
Method · 0.45
replace
Method · 0.45
Tested by
2
test_uri_substitutions
Method · 0.72
test_uri_windows
Method · 0.72
Used in the wild
real call sites across dependent graphs
searching dependent graphs…