I have a dropdown box where the user can select a method to check whether a certain string either equals or endswith another string.
I would think to use function pointers/objects as the dropdown box model and call the one currently selected, but since the methods are/would be
- string methods and
- equals doesn't exist
how do you best approach this in Python, also given that I'd have to call the methods on the column name like column.name.[selectedMethod](variableStringFromTextBox)
?
(It's an option that on a GUI reads "Use XYZ where column name [equals or endswith] " + textbox with variable string.)
Thanks