def _ipv4_to_bits(ipaddr):
 return ''.join([bin(int(x))[2:].rjust(8, '0') for x in ipaddr.split('.')])

def _ipv4_to_bits ( ipaddr ) : return '' . join ( [ bin ( int ( x ) ) [ 2 : ] . rjust ( 8 , '0' ) for x in ipaddr . split ( '.' ) ] )
accepts an ipv4 dotted quad and returns a string representing its binary counterpart .