Accessing my own mesh class
Alternatively
If we wish to make a special mesh class based on bpy.types.Mesh
import bpy


class Triangle(bpy.types.Mesh):
    def __init__(self, verts):
        self.is_triangle = True
        pass
    def __new__(cls, verts):
        me = bpy.data.meshes.new(&quot;Tri&quot;)
        # why bother with bmesh for a tri?
        me.from_pydata(verts, [], ((0, 1, 2),))
        return bpy.types.Mesh.__new__(Triangle, me)

# test
from math import sqrt
root = sqrt(3) / 2
context = bpy.context    
tri = Triangle(
   (
        (-root, -.5, 0),
        (0, 1, 0),
        (root, -.5, 0),
    )
)       


print(tri)
print(tri.is_triangle)
print(tri.vertices)
ob = bpy.data.objects.new(&quot;Tri&quot;, tri)
context.collection.objects.link(ob)

output
&lt;bpy_struct, Mesh(&quot;Tri.012&quot;) at 0x7fd4057b6c08&gt;
True
&lt;bpy_collection[0], MeshVertices&gt;

as well as triangle object linked to context collection.