def _property_resolver(arg):
 try:
  float(arg)
 except ValueError:
  return Variable(arg).resolve
 else:
  return itemgetter(arg)

def _property_resolver ( arg ) : try : float ( arg ) except ValueError : return Variable ( arg ) . resolve else : return itemgetter ( arg )
when arg is convertible to float .