def set_rate_limiting(rate_limit, min_wait=timedelta(milliseconds=50)):
 global RATE_LIMIT
 global RATE_LIMIT_MIN_WAIT
 global RATE_LIMIT_LAST_CALL
 RATE_LIMIT = rate_limit
 if (not rate_limit):
  RATE_LIMIT_MIN_WAIT = None
 else:
  RATE_LIMIT_MIN_WAIT = min_wait
 RATE_LIMIT_LAST_CALL = None

def set_rate_limiting ( rate_limit , min_wait = timedelta ( milliseconds = 50 ) ) : global RATE_LIMIT global RATE_LIMIT_MIN_WAIT global RATE_LIMIT_LAST_CALL RATE_LIMIT = rate_limit if ( not rate_limit ) : RATE_LIMIT_MIN_WAIT = None else : RATE_LIMIT_MIN_WAIT = min_wait RATE_LIMIT_LAST_CALL = None
enable or disable rate limiting on requests to the mediawiki servers .