def cfset_to_set(cfset):
 count = cf.CFSetGetCount(cfset)
 buffer = (c_void_p * count)()
 cf.CFSetGetValues(cfset, byref(buffer))
 return set([cftype_to_value(c_void_p(buffer[i])) for i in range(count)])

def cfset_to_set ( cfset ) : count = cf . CFSetGetCount ( cfset ) buffer = ( c_void_p * count ) ( ) cf . CFSetGetValues ( cfset , byref ( buffer ) ) return set ( [ cftype_to_value ( c_void_p ( buffer [ i ] ) ) for i in range ( count ) ] )
convert cfset to python set .