I am attempting to initialize some static class variables using static functions defined in the class. Python is throwing an error, indicating that the class name is not defined when I call said static function during initialization. Is there a better way to do this? Thank you.
>>> class Example:
... varA = 5
... @staticmethod
... def func():
... return Example.varA + 1
... varB = func.__func__()
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 6, in Example
File "<stdin>", line 5, in func
NameError: global name 'Example' is not defined
func.