BMesh: How to get a list of faces and edges, given the vectors (and delete them)?
I think that parameter geom is wrong.
geom (list of (bmesh.types.BMVert, bmesh.types.BMEdge, bmesh.types.BMFace)) 

import bpy
import bmesh

if bpy.context.mode != 'OBJECT':
    bpy.ops.object.mode_set()

bpy.ops.mesh.primitive_uv_sphere_add(segments=32, ring_count=16)
bpy.ops.object.mode_set(mode='EDIT')

bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.mesh.select_random(percent=50.0, seed=0, action='SELECT')

obj = bpy.context.active_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

list = [v for v in bm.verts if v.select]
list += [e for e in bm.edges if e.select]
list += [f for f in bm.faces if f.select]

bmesh.ops.delete(bm, geom=list, context=4)

bmesh.update_edit_mesh(me)