I want to use a variable for two instances in python. When a instance update the variable, it also be updated in other instances.
my variable is task_id:
class Task(object):     # pragma: no cover
    def run_deploy(self, args, **kwargs):
        # atexit.register(atexit_handler)
        self.task_id = kwargs.get('task_id', str(uuid.uuid4()))
    def start_benchmark(self, args, **kwargs):
        """Start a benchmark scenario."""
        atexit.register(atexit_handler)
        self.task_id = kwargs.get('task_id', str(uuid.uuid4()))
But when I run code, I detected that task_id has different value, I want they have same value.
Please let me know how to do it. Thanks!
 
     
    