#NEWLINE# def __init__( self , available_urls , max_failures = MAX_FAILURES ) : #NEWLINE# #INDENT# 'Save parsed input urls in order and perform basic validations.\n\n    :param available_urls: input urls pre-sorted by their ping times.\n    ' #NEWLINE# if ( len ( available_urls ) == 0 ) : #NEWLINE# #INDENT# raise ValueError ( 'BestUrlSelector requires at least one url to select from.' ) #NEWLINE# #UNINDENT# self . parsed_urls = deque ( self . _parse_urls ( max_failures ) ) #NEWLINE# self . unsuccessful_calls = Counter ( ) #NEWLINE# self . max_failures = max_failures