reno.parser.parse_op_str#
- reno.parser.parse_op_str(string, no_op=False)#
Pull out the topmost operation and component arguments, leaving all nested/sub components as raw strings. This effectively pulls out just the data needed to construct the next root of an equation tree.
- Parameters:
string (str) – The string of serialized operations/equation repr.
no_op (bool) – Specify
Trueif you have a string that only contains arguments, useful for custom parse functions in certain classes (e.g. piecewise)
- Returns:
A tuple with the operation name string, and a list of strings for each argument found (again only at the top level.)
- Return type:
tuple[str, list[str]]