def safe_range(*args):
 rng = range(*args)
 if (len(rng) > MAX_RANGE):
  raise OverflowError(('range too big, maximum size for range is %d' % MAX_RANGE))
 return rng

def safe_range ( * args ) : rng = range ( * args ) if ( len ( rng ) > MAX_RANGE ) : raise OverflowError ( ( 'range too big, maximum size for range is %d' % MAX_RANGE ) ) return rng
a range that cant generate ranges with a length of more than max_range items .