Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pybind/pybind11
/ _to_int
Function
_to_int
pybind11/_version.py:27–31 ·
view source on GitHub ↗
(s: str)
Source
from the content-addressed store, hash-verified
25
26
27
def
_to_int(s: str) -> int | str:
28
try
:
29
return
int(s)
30
except
ValueError:
31
return
s
32
33
34
version_info = tuple(_to_int(s)
for
s in __version__.split(
"."
))
Callers
1
_version.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected