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

Function _format_optvalue

Lib/tkinter/ttk.py:30–38  ·  view source on GitHub ↗

Internal function.

(value, script=False)

Source from the content-addressed store, hash-verified

28
29
30def _format_optvalue(value, script=False):
31 """Internal function."""
32 if script:
33 # if caller passes a Tcl script to tk.call, all the values need to
34 # be grouped into words (arguments to a command in Tcl dialect)
35 value = _stringify(value)
36 elif isinstance(value, (list, tuple)):
37 value = _join(value)
38 return value
39
40def _format_optdict(optdict, script=False, ignore=None):
41 """Formats optdict to a tuple to pass it to tk.call.

Callers 3

_format_optdictFunction · 0.85
_format_mapdictFunction · 0.85
_format_elemcreateFunction · 0.85

Calls 2

_stringifyFunction · 0.90
_joinFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…