%PDF- %PDF-
Direktori : /lib/python3/dist-packages/netaddr/ip/__pycache__/ |
Current File : //lib/python3/dist-packages/netaddr/ip/__pycache__/__init__.cpython-312.pyc |
� �C�^� � � � d Z ddlZddlmZmZmZmZmZm Z m Z mZmZm Z ddlmZmZ ddlmZmZmZmZmZmZ G d� de� Z G d� d e� Z G d � de� ZdGd�Z G d � dee� Z G d� dee� Z d� Z!d� Z"d� Z#d� Z$d� Z%d� Z&dHd�Z'd� Z(d� Z)d� Z*d� Z+ ed� Z, ed� ed� ed� ed � ed!� ed"� e d#d$� fZ- ed%� Z. ed&� Z/ ed'� Z0 ed(� ed)� ed*� ed+� ed,� ed-� e d.d/� e d0d1� fe,e0fz Z1 ed2� Z2 ed3� ed4� fZ3 ed5� Z4 ed6� Z5 ed7� ed8� ed9� ed:� ed;� ed<� ed=� ed>� ed?� ed@� edA� edB� edC� edD� edE� edF� fZ6y)Iz9Routines for IPv4 and IPv6 addresses, subnets and ranges.� N) �AddrFormatError�AddrConversionError�num_bits� DictDotLookup�NOHOST�N� INET_PTON�P�ZEROFILL�Z)�ipv4�ipv6)�_sys_maxint� _iter_next�_iter_range�_is_str� _int_type� _str_typec � � e Zd ZdZdZd� Zd� Z ed� ed�� Zd� Z d � Z d � Zd� Zd� Z d � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zed� � Zed� � Zy)�BaseIPzi An abstract base class for common operations shared between various IP related subclasses. )�_value�_module�__weakref__c � � d| _ d| _ y)zConstructor.N)r r ��selfs �5/usr/lib/python3/dist-packages/netaddr/ip/__init__.py�__init__zBaseIP.__init__ s � ������� c �� � t |t � st dt |� z � �d|cxk r| j j k s$n t d| j j z � �|| _ y )N�int argument expected, not %sr z&value out of bounds for an %s address!) � isinstancer � TypeError�typer �max_intr �family_namer �r �values r � _set_valuezBaseIP._set_value sa � ��%��+��;�d�5�k�I�J�J��E�1�T�\�\�1�1�1�!�"J��,�,�*�*�#+� ,� ,���r c � � | j S �N�r r s r �<lambda>zBaseIP.<lambda>( s � �$�+�+� r z?a positive integer representing the value of IP address/subnet.��docc � � t S �zP :return: a key tuple that uniquely identifies this IP address. ��NotImplementedr s r �keyz BaseIP.key+ s � � �r c � � t S )zg :return: A key tuple used to compare and sort this `IPAddress` correctly. r2 r s r �sort_keyzBaseIP.sort_key1 s � � �r c �4 � t | j � � S )zM :return: A hash value uniquely indentifying this IP object. )�hashr4 r s r �__hash__zBaseIP.__hash__8 s � � �D�H�H�J��r c �| � | j � |j � k( S # t t f$ r t cY S w xY w)z� :param other: an `IPAddress` or `IPNetwork` object. :return: ``True`` if this `IPAddress` or `IPNetwork` object is equivalent to ``other``, ``False`` otherwise. �r4 �AttributeErrorr# r3 �r �others r �__eq__z BaseIP.__eq__>