parameters: (self, s)
return_statement: return self.validate(None, test)
docstring: Load value from a single string
docstring_summary: Load value from a single string
docstring_tokens: Load value from a single string
function: def from_string(self, s):
          """Load value from a single string"""
          if not isinstance(s, str):
              raise TraitError(f"Expected string, got {s!r}")
          try:
              test = literal_eval(s)
          except Exception:
              test = None
          return self.validate(None, test)
function_tokens: def from_string ( self , s ) : if not isinstance ( s , str ) : raise TraitError ( f"Expected string, got {s!r}" ) try : test = literal_eval ( s ) except Exception : test = None return self . validate ( None , test )