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

Method _options

Lib/tkinter/__init__.py:1656–1680  ·  view source on GitHub ↗

Internal function.

(self, cnf, kw = None)

Source from the content-addressed store, hash-verified

1654 return ws
1655
1656 def _options(self, cnf, kw = None):
1657 """Internal function."""
1658 if kw:
1659 cnf = _cnfmerge((cnf, kw))
1660 else:
1661 cnf = _cnfmerge(cnf)
1662 res = ()
1663 for k, v in cnf.items():
1664 if v is not None:
1665 if k[-1] == '_': k = k[:-1]
1666 if callable(v):
1667 v = self._register(v)
1668 elif isinstance(v, (tuple, list)):
1669 nv = []
1670 for item in v:
1671 if isinstance(item, int):
1672 nv.append(str(item))
1673 elif isinstance(item, str):
1674 nv.append(_stringify(item))
1675 else:
1676 break
1677 else:
1678 v = ' '.join(nv)
1679 res = res + ('-'+k, v)
1680 return res
1681
1682 def nametowidget(self, name):
1683 """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 7

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

Tested by

no test coverage detected