#NEWLINE# def _check_packed_address( self , address , expected_len ) : #NEWLINE# #INDENT# address_len = len ( address ) #NEWLINE# if ( address_len != expected_len ) : #NEWLINE# #INDENT# msg = '%r (len %d != %d) is not permitted as an IPv%d address' #NEWLINE# raise AddressValueError ( ( msg % ( address , address_len , address , self . _version ) ) )