Dup Goto 📝

ObjectsMethodsInstances

PT2/lang/python/syntax 10-17 14:36:39
To Pop
8 lines, 22 words, 311 chars Tuesday 2023-10-17 14:36:39

Check for method

The equivalent of PHP's method_exists. See this stackoverflow

invert_op = getattr(self, "invert_op", None)
if callable(invert_op):
    invert_op(self.path.parent_op)