Skip to content
Snippets Groups Projects
Commit c51e5876 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

DOC/API: name of ifelse was changed to submatch

parent c233f07f
Branches
Tags
2 merge requests!160STY: styling,!126Transformers
Pipeline #45810 failed
...@@ -27,9 +27,12 @@ import re ...@@ -27,9 +27,12 @@ import re
from typing import Any from typing import Any
def ifelse(in_value: Any, in_parameters: dict): def submatch(in_value: Any, in_parameters: dict):
"""returns the first argument if it does NOT match the reg exp of 'match' stored in the second """
argument, other wise the value of 'then' stored in the second argument is returned. Substitute the variable if it matches the regexp stored in "match".
Returns the "in" value if it does NOT match the reg exp of 'match'.
Otherwise (if it matches) the value of 'then' stored in the second argument is returned.
""" """
if "match" not in in_parameters or "then" not in in_parameters: if "match" not in in_parameters or "then" not in in_parameters:
raise RuntimeError("Mandatory parameters missing.") raise RuntimeError("Mandatory parameters missing.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment