def _isinfinity(num):
 num = str(num).lower()
 return _infinity_map.get(num, 0)

def _isinfinity ( num ) : num = str ( num ) . lower ( ) return _infinity_map . get ( num , 0 )
determines whether a string or float is infinity .