What is the coding alternative for double edge loop select?
Bmesh script.
With a single boundary edge selected in edit mode, the LHS of question images can be achieved calling bpy.ops.mesh.loop_multi_select() directly from the python console.
&gt;&gt;&gt; bpy.ops.mesh.loop_multi_select(
loop_multi_select()
bpy.ops.mesh.loop_multi_select(ring=False)
Select a loop of connected edges by connection type
&gt;&gt;&gt; bpy.ops.mesh.loop_multi_select()
{'FINISHED'}


The mesh.loop_select operator is a different kettle of fish and requires context override if called from outside the 3D view.
This is a matter of giving the context override dictionary a 3d view &quot;area&quot;, &quot;space_data&quot; and &quot;region&quot;
However even then, with all combos of options it still did not perform as did the alt double click on my test mesh.
Use bmesh.
IMO edit mode mesh operators can become mind-numbingly annoying to code when they cannot be &quot;made to perform&quot; as desired
Touched on some  other reasons to avoid operators Element indices messed up after switching from Edit to Object Mode
Can instead create our own methods
The boundary select function below takes an edge, tags it, looks at all untagged boundary edges linked to its two end verts, tags them and so on until it can go no further, then returns the edges.
Test script, run in edit mode with a single boundary edge selected.
import bpy
import bmesh
from collections import defaultdict

context = bpy.context

ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)

edge = bm.select_history.active

assert isinstance(edge, bmesh.types.BMEdge), &quot;Select an Edge&quot;

def boundary_select(edge):
    tag = defaultdict(bool)
    tag[edge] = True
    grow = True
    edges = [edge]
    while grow:
        more = [
        el for es in edges 
        for v in es.verts 
        for el in v.link_edges if not tag[el] and el.is_boundary
        ]
        edges.extend(more)
        for e in more:
            tag[e] = True
        grow = bool(more)
    return edges
        
for e in boundary_select(edge):
    e.select_set(True)
bmesh.update_edit_mesh(me)

Persistence of element tag and select using bound bmesh
How to detect disconnected parts within a selection?