MCPcopy 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
305def _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
313def _tclobj_to_py(val):
314 """Return value converted from Tcl object to Python object."""

Callers 1

_adjustMethod · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected