parse_table#

VSPEC.params.base.parse_table(val, cls)#

Parse some input that could potentially construct a PSGtable object.

If val is a dictionary, use it to construct a table. Otherwise, construct an object of type cls from val (which is probably a string).

Parameters:
  • val (any) – The input to parse.

  • cls (type) – The class to cast val to if it is not a dictionary.

Returns:

The parsed input.

Return type:

any