I have a tuple like the following:
self.tagnames = (('string', self.do_anything()),)
It should execute a specific function if a string matches to another.
However, when I initialize self.tagnames, it seems to execute the function already.
How can I fix my issue without executing the function on startup?
The
()is a function call. If you want to defer the call until later, and just include the function reference without the parens like so.