def _unsugar_count_from(**kw):
 count_from = kw.pop('count_from', None)
 if ((kw.get('ordering_func', None) is None) and (count_from is not None)):
  if (count_from == 0):
   kw['ordering_func'] = count_from_0
  elif (count_from == 1):
   kw['ordering_func'] = count_from_1
  else:
   kw['ordering_func'] = count_from_n_factory(count_from)
 return kw

def _unsugar_count_from ( ** kw ) : count_from = kw . pop ( 'count_from' , None ) if ( ( kw . get ( 'ordering_func' , None ) is None ) and ( count_from is not None ) ) : if ( count_from == 0 ) : kw [ 'ordering_func' ] = count_from_0 elif ( count_from == 1 ) : kw [ 'ordering_func' ] = count_from_1 else : kw [ 'ordering_func' ] = count_from_n_factory ( count_from ) return kw
builds counting functions from keyword arguments .