I would like to modify an object private variable
class Example(): __myTest1 = 1 __myTest2 = 1 def __init__(self): pass def modifyTes
Try adding a single underscore and the class name to the beginning of the variable.
def modifyTest(name = 'Test1', value): setattr(self, '_Example__my' + name, value)