(tk, options, *args)
return _splitdict(tk, res, conv=_tclobj_to_py)
Format options then call Tk command with args and options and return
    the appropriate result.

    If no option is specified, a dict is returned. If an option is
    specified with the None value, the value for that option is returned.
    Otherwise, the function just sets the passed options and the caller
    shouldn't be expecting a return value anyway.
Format options then call Tk command with args and options and return
    the appropriate result.
Format options then call Tk command with args and options and return the appropriate result .
def _val_or_dict(tk, options, *args):
    """Format options then call Tk command with args and options and return
    the appropriate result.

    If no option is specified, a dict is returned. If an option is
    specified with the None value, the value for that option is returned.
    Otherwise, the function just sets the passed options and the caller
    shouldn't be expecting a return value anyway."""
    options = _format_optdict(options)
    res = tk.call(*(args + options))

    if len(options) % 2: # option specified without a value, return its value
        return res

    return _splitdict(tk, res, conv=_tclobj_to_py)
def _val_or_dict ( tk , options , * args ) : options = _format_optdict ( options ) res = tk . call ( * ( args + options ) ) if len ( options ) % 2 : # option specified without a value, return its value return res return _splitdict ( tk , res , conv = _tclobj_to_py )