def randint(low, high=None, size=None):
 if (high is None):
  lo = 0
  hi = low
 else:
  lo = low
  hi = high
 if (lo >= hi):
  raise ValueError('low >= high')
 diff = ((hi - lo) - 1)
 rs = generator.get_random_state()
 return (lo + rs.interval(diff, size))

def randint ( low , high = None , size = None ) : if ( high is None ) : lo = 0 hi = low else : lo = low hi = high if ( lo >= hi ) : raise ValueError ( 'low >= high' ) diff = ( ( hi - lo ) - 1 ) rs = generator . get_random_state ( ) return ( lo + rs . interval ( diff , size ) )
returns a random integer x with minvalue <= x <= maxvalue .