How to share variable among more than 2 operation I have a question about blender's python script.
I would like to share variables among more than two operations, however I don't know how to.

If I use global variable, it's easy to solve this problem.

selected_faces = []
class SelectFace(bpy.types.Operator):
    bl_label = "Select Face"
    def execute(self, context):
        global selected_faces
        selected_faces = ...   # get selected faces.
        .....
class OperationAboutSelectedFaces(bpy.types.Operator):
    bl_label = "Operation About selected Face"
    def execute(self, context):
        global selected_faces
        # some operation to "selected_faces"


However, I want to avoid using global variable.
So, I would like to rewrite this code as follows...

class SelectFace(bpy.types.Operator):
    bl_label = "Select Face"
    def execute(self, context):
        selected_faces = ... # get selected faces.
        .....
class OperationAboutSelectedFaces(bpy.types.Operator):
    bl_label = "Operation About selected Face"
    def execute(self, context):
        # some operation to "selected_faces"


Assuming operation sequence are as follows.


"Select Face"
"Operation About selected faces"


Thanks!
Finally, I solved this problem using static variable.

class SelectFace(bpy.types.Operator):
    bl_label = "Select Face"
    selected_faces = None
    def __init__(self):
        SelectFace.selected_faces = None
    def execute(self, context):
        SelectFace.selected_faces = ... # get selected faces.
        .....
class OperationAboutSelectedFaces(bpy.types.Operator):
    bl_label = "Operation About selected Face"
    def __init__(self):
        selected_faces = SelectFace.selected_faces
    def execute(self, context):
        # some operation to "selected_faces"


Thanks for your advice.