Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ _to_number
Function
_to_number
Lib/tkinter/ttk.py:305–311 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
303
return
value
304
305
def
_to_number(x):
306
if
isinstance(x, str):
307
if
'.'
in x:
308
x = float(x)
309
else
:
310
x = int(x)
311
return
x
312
313
def
_tclobj_to_py(val):
314
""
"Return value converted from Tcl object to Python object."
""
Callers
1
_adjust
Method · 0.85
Calls
1
isinstance
Function · 0.85
Tested by
no test coverage detected