docs: def smart_cast2(var):
      r"""
      if the variable is a string tries to cast it to a reasonable value.
      maybe can just use eval. FIXME: funcname
  
      Args:
          var (unknown):
  
      Returns:
          unknown: some var
  
      CommandLine:
          python -m utool.util_type --test-smart_cast2
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_type import *  # NOQA
          >>> import utool as ut
          >>> # build test data
          >>> var_list = ['?', 1, '1', '1.0', '1.2', 'True', None, 'None']
          >>> # execute function
          >>> castvar_list = [smart_cast2(var) for var in var_list]
          >>> # verify results
          >>> result = ut.repr4(castvar_list, nl=False)
          >>> print(result)
          ['?', 1, 1, 1.0, 1.2, True, None, None]
      """
      if var is None:
          return None
      if isinstance(var, six.string_types):
          castvar = None
          lower = var.lower()
          if lower == 'true':
              return True
          elif lower == 'false':
              return False
          elif lower == 'none':
              return None
          if var.startswith('[') and var.endswith(']'):
              #import re
              #subvar_list = re.split(r',\s*' + ut.negative_lookahead(r'[^\[\]]*\]'), var[1:-1])
              return smart_cast(var[1:-1], list)
          elif var.startswith('(') and var.endswith(')'):
              #import re
              #subvar_list = re.split(r',\s*' + ut.negative_lookahead(r'[^\[\]]*\]'), var[1:-1])
              return tuple(smart_cast(var[1:-1], list))
          type_list = [int, float]
          for type_ in type_list:
              castvar = try_cast(var, type_)
              if castvar is not None:
                  break
          if castvar is None:
              castvar = var
      else:
          castvar = var
      return castvar