Blender python, what design pattern the Operator class is designed
The HelloWorldOperator derives from the bpy.types.Operator base-class.
The self variable is a Pythonic class pattern, it is similar to this in C++ like languages. The class variables declared in the class header, e.g. bl_idname and bl_lable, are shared across all instances of the class. The self dictionary contains the per-instance variables and is always the first argument in a Python class method. It is automatically supplied on method calls.
The context comes from the Blender environment and contains pointers to the active object, collection, GUI mode and other things.
Classes deriving from bpy.types.Operator are high-level functions designed to be used as GUI callback functions. As such they only return GUI status.