how to select objects of type X ?

these were working before but seems it has been change

print ()

oball=bpy.ops.object.select_by_type( extend=False, type=‘MESH’)

print (‘Ob all =’,oball)
print ()

obj_sel = bpy.context.selected_objects

print (‘list LEN obj_sel=’,len(obj_sel))
print ()

if you select like that with bpy.ops
is there a way to get access to the list of selected object or to one element of the list

or do you have to use the bpy.type to do it like this ?

objcurve_sel = bpy.context.selected_objects


for i in objcurve_sel:
if i.type==‘CURVE’:
print (‘jj=’,jj,’ Curve name=’,,‘Type’,i.type)

print ()
print (’ Qty of curves = ',jj)
print ()