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

Function _to_number

Lib/tkinter/ttk.py:303–309  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

301 return value
302
303def _to_number(x):
304 if isinstance(x, str):
305 if '.' in x:
306 x = float(x)
307 else:
308 x = int(x)
309 return x
310
311def _tclobj_to_py(val):
312 """Return value converted from Tcl object to Python object."""

Callers 1

_adjustMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…