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

Method _gridconvvalue

Lib/tkinter/__init__.py:1973–1985  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

1971 bbox = grid_bbox
1972
1973 def _gridconvvalue(self, value):
1974 if isinstance(value, (str, _tkinter.Tcl_Obj)):
1975 try:
1976 svalue = str(value)
1977 if not svalue:
1978 return None
1979 elif '.' in svalue:
1980 return self.tk.getdouble(svalue)
1981 else:
1982 return self.tk.getint(svalue)
1983 except (ValueError, TclError):
1984 pass
1985 return value
1986
1987 def _grid_configure(self, command, index, cnf, kw):
1988 """Internal function."""

Callers 1

_grid_configureMethod · 0.95

Calls 3

strFunction · 0.85
getdoubleMethod · 0.80
getintMethod · 0.45

Tested by

no test coverage detected