def seterr(divide=False):
 if (_errdict['divide'] != divide):
  clear_cache()
  _errdict['divide'] = divide

def seterr ( divide = False ) : if ( _errdict [ 'divide' ] != divide ) : clear_cache ( ) _errdict [ 'divide' ] = divide
should sympy raise an exception on 0/0 or return a nan? divide == true .