How do I use bmesh on a set?
Firstly the issue and error with your code.

Operators only return a python  set containing the status of the operation, for example {'FINISHED'} if finished normally, or {'CANCELLED'} if there was a problem.  

On looping a primitive add operator, the object will be context.object the mesh context.object.data on each iteration.  If run in edit mode, (enter_editmode takes you into edit mode on first iteration) then all will be added to the edit objects mesh. This is why you have one object.

Secondly, I'd probably use the bmesh create cone operator as pointed out in answer by @TLousky,  for completeness here is a way to put the created cylinders into a "live" bmesh, that is a bmesh from the edit objects edit mesh.  To demonstrate, I've put in code to select the ngon caps of the cylinders.

import bpy
import bmesh
context = bpy.context
ccValids = [(1, 1, 1), (2, 2, 2)]
for c in ccValids:
    leafs = bpy.ops.mesh.primitive_cylinder_add( location = c, enter_editmode = True )
# we will now be in edit mode
bm = bmesh.from_edit_mesh(context.edit_object.data)
# deselect all but ngon faces
for f in bm.faces:
    f.select = len(f.verts) &gt; 4



Result.  Still in edit  mode, cylinder ngon caps selected.

When you've finished operations, a bmesh.update_edit_mesh(context.object.data) will update the edit mesh.