Aug-14-2019, 06:29 PM
i want to have class attribute names which could otherwise be used as variables be used for function references so i can keep everything for a thread in the same class. since a "def" is like an assignment, too, can i assign to a class attribute like this?
class foo(): ... foo.var1 = 0 ... def foo.fun1(bar): foo.count += 1 return bar*bari no longer like to just try things to "see if they work" since i have found that modifying the locals() dictionary is an example of something that looks like it might work, but doesn't always do so.