parameters: (tk, options, *args)
return_statement: return _splitdict(tk, res, conv=_tclobj_to_py)
docstring: 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.
docstring_summary: Format options then call Tk command with args and options and return
      the appropriate result.
docstring_tokens: Format options then call Tk command with args and options and return the appropriate result .
function: 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)
function_tokens: 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 )