#NEWLINE# def validate_page_num( page , pages ) : #NEWLINE# #INDENT# if ( ( page < 0 ) or ( pages and ( page >= pages ) ) ) : #NEWLINE# #INDENT# raise HTTPError ( http . BAD_REQUEST , data = dict ( message_long = 'Invalid value for "page".' ) )