MCPcopy Index your code
hub / github.com/RustPython/RustPython / _options

Method _options

Lib/tkinter/__init__.py:1638–1662  ·  view source on GitHub ↗

Internal function.

(self, cnf, kw = None)

Source from the content-addressed store, hash-verified

1636 return ws
1637
1638 def _options(self, cnf, kw = None):
1639 """Internal function."""
1640 if kw:
1641 cnf = _cnfmerge((cnf, kw))
1642 else:
1643 cnf = _cnfmerge(cnf)
1644 res = ()
1645 for k, v in cnf.items():
1646 if v is not None:
1647 if k[-1] == '_': k = k[:-1]
1648 if callable(v):
1649 v = self._register(v)
1650 elif isinstance(v, (tuple, list)):
1651 nv = []
1652 for item in v:
1653 if isinstance(item, int):
1654 nv.append(str(item))
1655 elif isinstance(item, str):
1656 nv.append(_stringify(item))
1657 else:
1658 break
1659 else:
1660 v = ' '.join(nv)
1661 res = res + ('-'+k, v)
1662 return res
1663
1664 def nametowidget(self, name):
1665 """Return the Tkinter instance of a widget identified by

Callers 15

tk_busy_configureMethod · 0.95
tk_busy_holdMethod · 0.95
clipboard_getMethod · 0.95
clipboard_clearMethod · 0.95
clipboard_appendMethod · 0.95
selection_clearMethod · 0.95
selection_getMethod · 0.95
selection_handleMethod · 0.95
selection_ownMethod · 0.95
selection_own_getMethod · 0.95
_configureMethod · 0.95
_grid_configureMethod · 0.95

Calls 9

_registerMethod · 0.95
_cnfmergeFunction · 0.85
callableFunction · 0.85
isinstanceFunction · 0.85
strFunction · 0.85
_stringifyFunction · 0.85
itemsMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected