%PDF- %PDF-
Direktori : /lib/python3/dist-packages/dns/__pycache__/ |
Current File : //lib/python3/dist-packages/dns/__pycache__/ipv4.cpython-312.pyc |
� 5��e� � �h � d Z ddlZddlmZ ddlZdedefd�Zdeeef defd�Z deeef defd �Z y) zIPv4 helper functions.� N)�Union�address�returnc �| � t | � dk7 rt j j �d| d | d | d | d fz S )z�Convert an IPv4 address in binary form to text form. *address*, a ``bytes``, the IPv4 address in binary form. Returns a ``str``. � z%u.%u.%u.%ur � � � )�len�dns� exception�SyntaxError)r s �*/usr/lib/python3/dist-packages/dns/ipv4.py� inet_ntoar sD � � �7�|�q���m�m�'�'�'��G�A�J��� �G�A�J��� �K�K�K� �textc �F � t | t � s| j � }n| }|j d� }t |� dk7 rt j j �|D ]f }|j � st j j �t |� dkD s�<|d t d� k( s�Nt j j � |D �cg c] }t |� �� }}t j dg|��� S c c}w # t $ r t j j �w xY w)z�Convert an IPv4 address in text form to binary form. *text*, a ``str`` or ``bytes``, the IPv4 address in textual form. Returns a ``bytes``. � .r r r �0�BBBB)� isinstance�bytes�encode�splitr r r r �isdigit�ord�int�struct�pack� Exception)r �btext�parts�part�bs r � inet_atonr% '