Current File : //proc/self/root/usr/lib/python3.12/__pycache__/functools.cpython-312.pyc
�

�4h����dZgd�ZddlmZddlmZddlmZddlm	Z	ddl
mZdZd	Z
ee
fd
�Zee
fd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdefdefdefgdefdefdefgdefdefdefgdefdefdefgd�Zd�Zd�Z	ddlmZe!�Z"e"fd �Z#	dd!lm#Z#Gd"�d#�Z$	dd$lm$Z$Gd%�d&e!�Z%d'�Z&ed(gd)��Z'Gd*�d+e(�Z)e!�fe*e+he,e-e.fd,�Z/d;d-�Z0d.�Z1	dd/lm1Z1d0�Z2d1�Z3d<d3�Z4d4�Z5d5�Z6d6�Z7Gd7�d8�Z8e!�Z9Gd9�d:�Z:y2#e $rY��wxYw#e $rY��wxYw#e $rY��wxYw#e $rY�WwxYw)=zEfunctools.py - Tools for working with functions and callable objects
)�update_wrapper�wraps�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATES�total_ordering�cache�
cmp_to_key�	lru_cache�reduce�partial�
partialmethod�singledispatch�singledispatchmethod�cached_property�)�get_cache_token)�
namedtuple)�recursive_repr)�RLock)�GenericAlias)�
__module__�__name__�__qualname__�__doc__�__annotations__�__type_params__)�__dict__c���|D]}	t||�}t|||��|D](}t||�jt||i���*||_|S#t$rY�`wxYw)aUpdate a wrapper function to look like the wrapped function

       wrapper is the function to be updated
       wrapped is the original function
       assigned is a tuple naming the attributes assigned directly
       from the wrapped function to the wrapper function (defaults to
       functools.WRAPPER_ASSIGNMENTS)
       updated is a tuple naming the attributes of the wrapper that
       are updated with the corresponding attribute from the wrapped
       function (defaults to functools.WRAPPER_UPDATES)
    )�getattr�setattr�AttributeError�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�values      � /usr/lib/python3.12/functools.pyrr#s����*��	*��G�T�*�E�
�G�T�5�)�
*��B������%�%�g�g�t�R�&@�A�B�"�G���N���	��	�s�A�	A$�#A$c�(�tt|||��S)a�Decorator factory to apply update_wrapper() to a wrapper function

       Returns a decorator that invokes update_wrapper() with the decorated
       function as the wrapper argument and the arguments to wraps() as the
       remaining arguments. Default arguments are as for update_wrapper().
       This is a convenience function to simplify applying partial() to
       update_wrapper().
    �r$r%r&)rrr+s   r)rrAs���>�7�$�g�7�7�c�`�t|�j||�}|tur|S|xr||k7S)zIReturn a > b.  Computed by @total_ordering from (not a < b) and (a != b).��type�__lt__�NotImplemented��self�other�	op_results   r)�_gt_from_ltr6Y�7���T�
�!�!�$��.�I��N�"����=�*�T�U�]�*r,c�^�t|�j||�}|tur|S|xs||k(S)zEReturn a <= b.  Computed by @total_ordering from (a < b) or (a == b).r.r2s   r)�_le_from_ltr9`�5���T�
�!�!�$��.�I��N�"����%���
�%r,c�R�t|�j||�}|tur|S|S)z=Return a >= b.  Computed by @total_ordering from (not a < b).r.r2s   r)�_ge_from_ltr<g�.���T�
�!�!�$��.�I��N�"����=�r,c�`�t|�j||�}|tur|S|xs||k(S)zJReturn a >= b.  Computed by @total_ordering from (not a <= b) or (a == b).�r/�__le__r1r2s   r)�_ge_from_lerAn�7���T�
�!�!�$��.�I��N�"����=�)�D�E�M�)r,c�^�t|�j||�}|tur|S|xr||k7S)zFReturn a < b.  Computed by @total_ordering from (a <= b) and (a != b).r?r2s   r)�_lt_from_lerDu�5���T�
�!�!�$��.�I��N�"����&����&r,c�R�t|�j||�}|tur|S|S)z=Return a > b.  Computed by @total_ordering from (not a <= b).r?r2s   r)�_gt_from_lerG|r=r,c�`�t|�j||�}|tur|S|xr||k7S)zIReturn a < b.  Computed by @total_ordering from (not a > b) and (a != b).�r/�__gt__r1r2s   r)�_lt_from_gtrK�r7r,c�^�t|�j||�}|tur|S|xs||k(S)zEReturn a >= b.  Computed by @total_ordering from (a > b) or (a == b).rIr2s   r)�_ge_from_gtrM�r:r,c�R�t|�j||�}|tur|S|S)z=Return a <= b.  Computed by @total_ordering from (not a > b).rIr2s   r)�_le_from_gtrO�r=r,c�`�t|�j||�}|tur|S|xs||k(S)zJReturn a <= b.  Computed by @total_ordering from (not a >= b) or (a == b).�r/�__ge__r1r2s   r)�_le_from_gerS�rBr,c�^�t|�j||�}|tur|S|xr||k7S)zFReturn a > b.  Computed by @total_ordering from (a >= b) and (a != b).rQr2s   r)�_gt_from_gerU�rEr,c�R�t|�j||�}|tur|S|S)z=Return a < b.  Computed by @total_ordering from (not a >= b).rQr2s   r)�_lt_from_gerW�r=r,rJr@rRr0)r0r@rJrRc	��tD�chc]#}t||d�tt|d�us�"|��%}}|std��t	|�}t|D]\}}||vs�||_t
|||�� |Scc}w)z6Class decorator that fills in missing ordering methodsNz6must define at least one ordering operation: < > <= >=)�_convertr�object�
ValueError�maxrr)�cls�op�roots�root�opname�opfuncs      r)rr�s���#�^�B�g�c�2�t�&<�G�F�TV�X\�D]�&]�R�^�E�^���Q�R�R��u�:�D�"�4�.�)�������$�F�O��C���(�)��J��
_s
�#A7�A7c�*��G�fd�dt�}|S)z,Convert a cmp= function into a key= functionc�P��eZdZdgZd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z	dZ
y)	�cmp_to_key.<locals>.K�objc��||_y�N�rf)r3rfs  r)�__init__zcmp_to_key.<locals>.K.__init__�s	���D�Hr,c�D���|j|j�dkS�Nrri�r3r4�mycmps  �r)r0zcmp_to_key.<locals>.K.__lt__���������5�9�9�-��1�1r,c�D���|j|j�dkDSrlrirms  �r)rJzcmp_to_key.<locals>.K.__gt__�ror,c�D���|j|j�dk(Srlrirms  �r)�__eq__zcmp_to_key.<locals>.K.__eq__���������5�9�9�-��2�2r,c�D���|j|j�dkSrlrirms  �r)r@zcmp_to_key.<locals>.K.__le__�rsr,c�D���|j|j�dk\Srlrirms  �r)rRzcmp_to_key.<locals>.K.__ge__�rsr,N)rrr�	__slots__rjr0rJrrr@rR�__hash__)rns�r)�Kre�s-����G�	�	�	2�	2�	3�	3�	3��r,rx)rZ)rnrxs` r)rr�s����F��
�Hr,)rc��t|�}|tur
	t|�}n|}|D]}|||�}�
|S#t$r
t	d�d�wxYw)a�
    reduce(function, iterable[, initial]) -> value

    Apply a function of two arguments cumulatively to the items of a sequence
    or iterable, from left to right, so as to reduce the iterable to a single
    value.  For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
    ((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
    of the iterable in the calculation, and serves as a default when the
    iterable is empty.
    z0reduce() of empty iterable with no initial valueN)�iter�_initial_missing�next�
StopIteration�	TypeError)�function�sequence�initial�itr(�elements      r)r
r
�sv��
�h��B��"�"�	N���H�E�
���)�����(��)��L���	N��B�D�IM�
N�	N�s	�5�A)r
c�R��eZdZdZdZ�fd�Zd�Ze�d��Zd�Z	d�Z
�xZS)rzSNew function with partial application of the given arguments
    and keywords.
    )�func�args�keywordsr�__weakref__c����t|�std��t|d�r+|j|z}i|j�|�}|j
}tt|�#|�}||_||_||_|S)Nz#the first argument must be callabler�)	�callabler~�hasattrr�r�r��superr�__new__)r]r�r�r�r3�	__class__s     �r)r�zpartial.__new__su�����~��A�B�B��4�� ��9�9�t�#�D�4�$�-�-�4�8�4�H��9�9�D��W�c�*�3�/����	���	� ��
��r,c�d�i|j�|�}|jg|j�|��i|��Srh�r�r�r�)r3r�r�s   r)�__call__zpartial.__call__+s7��0�d�m�m�0�x�0���t�y�y�7�$�)�)�7�d�7�h�7�7r,c��t|�j}t|j�g}|j	d�|j
D��|j	d�|jj�D��t|�jdk(rd|�ddj|��d�S|�ddj|��d�S)Nc3�2K�|]}t|����y�wrh)�repr)�.0�xs  r)�	<genexpr>z#partial.__repr__.<locals>.<genexpr>3s����/��D��G�/�s�c3�0K�|]\}}|�d|�����y�w)�=N��r��k�vs   r)r�z#partial.__repr__.<locals>.<genexpr>4s����E�V�a��q�c��1�%�L�E�s��	functoolsz
functools.�(�, �))
r/rr�r��extendr�r��itemsr�join)r3�qualnamer�s   r)�__repr__zpartial.__repr__/s�����:�*�*���T�Y�Y�� �����/�T�Y�Y�/�/����E�t�}�}�/B�/B�/D�E�E���:� � �K�/���z��4�9�9�T�?�*;�1�=�=���1�T�Y�Y�t�_�-�Q�/�/r,c��t|�|jf|j|j|jxsd|jxsdffSrh)r/r�r�r�r�r3s r)�
__reduce__zpartial.__reduce__9sC���D�z�D�I�I�<�$�)�)�T�Y�Y��}�}�$��d�m�m�&;�t�*=�=�	=r,c��t|t�std��t|�dk7rtdt|�����|\}}}}t	|�r4t|t�r$|�t|t
�r|�t|t
�std��t|�}|�i}nt
|�t
urt|�}|�i}||_||_||_	||_
y)Nz(argument to __setstate__ must be a tuple�zexpected 4 items in state, got zinvalid partial state)�
isinstance�tupler~�lenr��dictr/rr�r�r�)r3�stater�r��kwds�	namespaces      r)�__setstate__zpartial.__setstate__=s����%��'��F�G�G��u�:��?��=�c�%�j�\�J�K�K�&+�#��d�D�)����j��u�&=���Z��d�%;��!�*�Y��*E��3�4�4��T�{���<��D�
�$�Z�t�
#���:�D����I�!��
���	���	���
r,)rrrrrvr�r�rr�r�r��
__classcell__)r�s@r)rrs;����F�I�� 8���0��0�=�r,r)rc�J�eZdZdZd�Zd�Zd�Zdd�Zed��Z	e
e�Zy)	rz�Method descriptor with partial application of the given arguments
    and keywords.

    Supports wrapping existing descriptors and handles non-descriptor
    callables as instance methods.
    c�&�t|�s&t|d�stdj|���t	|t
�r;|j|_|j|z|_i|j�|�|_y||_||_||_y)N�__get__z${!r} is not callable or a descriptor)	r�r�r~�formatr�rr�r�r�)r3r�r�r�s    r)rjzpartialmethod.__init__cs~����~�g�d�I�&>��B�"(�&��,�0�
0�
�d�M�*��	�	�D�I��	�	�D�(�D�I�9�t�}�}�9��9�D�M��D�I��D�I�$�D�Mr,c�H�djtt|j��}djd�|jj�D��}d}|j
|jj|jj|j||��S)Nr�c3�FK�|]\}}dj||����y�w)z{}={!r}N)r�r�s   r)r�z)partialmethod.__repr__.<locals>.<genexpr>xs+����D�%)�Q��'�-�-�a��3�D�s�!z*{module}.{cls}({func}, {args}, {keywords}))�moduler]r�r�r�)r��mapr�r�r�r�r�r�rrr�)r3r�r��
format_strings    r)r�zpartialmethod.__repr__vs����y�y��T�4�9�9�-�.���9�9�D�-1�]�]�-@�-@�-B�D�D��D�
��#�#�4�>�>�+D�+D�(,���(C�(C�)-���)-�-5�	$�7�	7r,c�B���fd�}�j|_�|_|S)Nc�h��i�j�|�}�j|g�j�|��i|��Srhr�)�cls_or_selfr�r�r3s   �r)�_methodz3partialmethod._make_unbound_method.<locals>._method�s:���4�$�-�-�4�8�4�H��4�9�9�[�H�4�9�9�H�t�H�x�H�Hr,)�__isabstractmethod__�_partialmethod)r3r�s` r)�_make_unbound_methodz"partialmethod._make_unbound_method�s&���	I�(,�'@�'@��$�!%����r,Nc�6�t|jdd�}d}|�L|||�}||jur5t|g|j��i|j��}	|j
|_|� |j�j||�}|S#t$rY�/wxYw)Nr�)	rr�rr�r��__self__r r�r�)r3rfr]�get�result�new_funcs      r)r�zpartialmethod.__get__�s����d�i�i��D�1�����?��3��}�H��t�y�y�(�!��G�D�I�I�G����G���&.�&7�&7�F�O��>��.�.�0�8�8��c�B�F��
��
&����s�B�	B�Bc�0�t|jdd�S�Nr�F�rr�r�s r)r�z"partialmethod.__isabstractmethod__�����t�y�y�"8�%�@�@r,rh)
rrrrrjr�r�r��propertyr��classmethodr�__class_getitem__r�r,r)rr[s>���%�&	7���&�A��A�$�L�1�r,rc�`�t|t�r|j}t|t�r�|Srh)r�rr��r�s r)�_unwrap_partialr��s&��
�T�7�
#��y�y���T�7�
#��Kr,�	CacheInfo)�hits�misses�maxsize�currsizec�$�eZdZdZdZefd�Zd�Zy)�
_HashedSeqz� This class guarantees that hash() will be called no more than once
        per element.  This is important because the lru_cache() will hash
        the key multiple times on a cache miss.

    �	hashvaluec�(�||dd||�|_yrh�r�)r3�tup�hashs   r)rjz_HashedSeq.__init__�s����Q���c���r,c��|jSrhr�r�s r)rwz_HashedSeq.__hash__�s���~�~�r,N)rrrrrvr�rjrwr�r,r)r�r��s����I�!%�#�r,r�c�$��|}|r||z
}|j�D]}	||	z
}�	|rC||�fd�|D��z
}|rJ||�fd�|j�D��z
}t|�S||�dk(r�|d�|vr|dSt|�S)a�Make a cache key from optionally typed positional and keyword arguments

    The key is constructed in a way that is flat as possible rather than
    as a nested structure that would take more memory.

    If there is only a single argument and its data type is known to cache
    its hash value, then that argument is returned without a wrapper.  This
    saves space and improves lookup speed.

    c3�.�K�|]}�|����y�wrhr��r�r�r/s  �r)r�z_make_key.<locals>.<genexpr>�s�����+��T�!�W�+���c3�.�K�|]}�|����y�wrhr�r�s  �r)r�z_make_key.<locals>.<genexpr>�s�����8�Q��a��8�r��r)r��valuesr�)
r�r��typed�kwd_mark�	fasttypesr�r/r��key�items
      `   r)�	_make_keyr��s����$�C���x����J�J�L�	�D��4�K�C�	���u�+�d�+�+�+����5�8�$�+�+�-�8�8�8�C��c�?��

�S��Q��4��A��<�9�4��1�v�
��c�?�r,c�����t�t�r�dkrYd�nVt��r>t�t�r.�dc}�t	|��t
�}��fd�|_t||�S��td����fd�}|S)a�Least-recently-used cache decorator.

    If *maxsize* is set to None, the LRU features are disabled and the cache
    can grow without bound.

    If *typed* is True, arguments of different types will be cached separately.
    For example, f(3.0) and f(3) will be treated as distinct calls with
    distinct results.

    Arguments to the cached function must be hashable.

    View the cache statistics named tuple (hits, misses, maxsize, currsize)
    with f.cache_info().  Clear the cache and statistics with f.cache_clear().
    Access the underlying function with f.__wrapped__.

    See:  https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)

    r�c�����d�S�N�r�r�r�r�s��r)�<lambda>zlru_cache.<locals>.<lambda>�����%�,P�r,z=Expected first argument to be an integer, a callable, or Nonec�V��t|��t�}��fd�|_t||�S)Nc�����d�Sr�r�r�s��r)r�z8lru_cache.<locals>.decorating_function.<locals>.<lambda>r�r,)�_lru_cache_wrapper�
_CacheInfo�cache_parametersr)�
user_functionr#r�r�s  ��r)�decorating_functionz&lru_cache.<locals>.decorating_functions(���$�]�G�U�J�O��#P�� ��g�}�5�5r,)	r��intr��boolr�r�r�rr~)r�r�r�r#r�s``   r)r	r	�s����2�'�3���Q�;��G�	�'�	�z�%��6�!(�#��
�w�$�]�G�U�J�O��#P�� ��g�}�5�5�	�	��K�M�	M�6�
�r,c�d�������	�
���
��������t��t�d\�	���
i�dx��d��j��j�
t	��g���ddg�dd�dk(r��fd�}n#��
��������fd�}n���	�
���
���������fd�}��
����fd�}������fd�}||_||_|S)	N)rr���rFc�"���dz
��|i|��}|S�Nr�r�)r�r�r�r�r�s   ��r)r#z#_lru_cache_wrapper.<locals>.wrappers"���
�a�K�F�"�D�1�D�1�F��Mr,c�h���||�
�}�|�	�}|�	ur�dz
�|S�dz
��|i|��}|�|<|Srr�)r�r�r�r�r�	cache_getr��make_keyr��sentinelr�r�s    ��������r)r#z#_lru_cache_wrapper.<locals>.wrapper's[����4��u�-�C��s�H�-�F��X�%���	���
��a�K�F�"�D�1�D�1�F��E�#�J��Mr,c�����||��}�5�|�}|�:|\}}}}||�
<||�<��}|x|�
<��<||�<�|�
<�dz
�|cddd�S�dz
�ddd��|i|��}�5|�vrnT�r.�}	||	�<||	�<|	�
���}
��}dx��<��<�|
=|	�|<n$��}|�||g}|x|�
<x��<�|<���k\�ddd�|S#1swY�wxYw#1swY|SxYwrr�)r�r�r��link�	link_prev�	link_next�_keyr��last�oldroot�oldkey�	oldresult�KEY�NEXT�PREV�RESULTrr�	cache_len�fullr��lockrr�r�r`r�r�s            ����������������r)r#z#_lru_cache_wrapper.<locals>.wrapper6s�����4��u�-�C��

� ��~���#�9=�6�I�y�$��&/�I�d�O�&/�I�d�O���:�D�.2�2�D��J��d��!%�D��J�!%�D��J��A�I�D�!�

�

��!���

�#�D�1�D�1�F��#
4��%�<�
��"�G�#&�G�C�L�&,�G�F�O�#�4�=�D�!�#�Y�F� $�V��I�/3�3�D��I��V���f�
�")�E�#�J� ��:�D� �$��V�4�D�;?�?�D��J�?��d��e�C�j�&�K�7�2�D�G#
4�H�M�g

�

��#
4�H�M�s�;C�C�*AC�C�C$c�T���5�������cddd�S#1swYyxYw)zReport cache statisticsNr�)r�rr�rr�r�s������r)�
cache_infoz&_lru_cache_wrapper.<locals>.cache_infoos/���
�	B��d�F�G�Y�[�A�	B�	B�	B�s��'c�r���5�j���ddg�dddx��d�ddd�y#1swYyxYw)z$Clear the cache and cache statisticsNrF)�clear)rrr�rr�r`s������r)�cache_clearz'_lru_cache_wrapper.<locals>.cache_cleartsG����	��K�K�M��T�4��.�D��G���D�6��D�		�	�	�s� -�6)rZr�r��__len__rrr)r�r�r�r�r#rrrrrrrrrrr�rrr�r`rs````   @@@@@@@@@@@@@@r)r�r�
s�������x�H��H�(��D�$��V��E���D�6��D��	�	�I��
�
�I��7�D�
�D��T�4��&�D��G��!�|�	�
��	�	�7	�7	�7	�rB�B�
��$�G��%�G���Nr,)r�c�&�td��|�S)z@Simple lightweight unbounded cache.  Sometimes called "memoize".N)r�)r	)r�s r)rr�s��"�9�T�"�=�1�1r,c���g}	|D�cgc]}|s�|��	}}|s|S|D]}|d}|D]
}||ddvs�d}�n�td��|j|�|D]}|d|k(s�|d=��gcc}w)z�Merges MROs in *sequences* to a single MRO using the C3 algorithm.

    Adapted from https://www.python.org/download/releases/2.3/mro/.

    rr�NzInconsistent hierarchy)�RuntimeError�append)�	sequencesr��s�s1�	candidate�s2�seqs       r)�	_c3_merger'�s����F�
� )�/�1�Q�Q�/�	�/���M��	�B��1��I��
����1�2��&� $�I��
�
�	����7�8�8��
�
�i� ��	�C��1�v��"���F�	�!��/s
�A+�A+Nc����tt|j��D]+\}�t�d�s�t	|j�|z
}nd}|rt|�ng}t|jd|�}g}t|j|d�}|D]?�t
|��s�t�fd�|jD��r�/|j���A|D]�|j���|D�cgc]}t||����}}|D�cgc]}t||����}	}|D�cgc]}t||����}
}t|gg|z|	z|
z|gz|gz|gz�Scc}wcc}wcc}w)a�Computes the method resolution order using extended C3 linearization.

    If no *abcs* are given, the algorithm works exactly like the built-in C3
    linearization used for method resolution.

    If given, *abcs* is a list of abstract base classes that should be inserted
    into the resulting MRO. Unrelated ABCs are ignored and don't end up in the
    result. The algorithm inserts ABCs where their functionality is introduced,
    i.e. issubclass(cls, abc) returns True for the class itself but returns
    False for all its direct base classes. Implicit ABCs for a given class
    (either registered or inferred from the presence of a special method like
    __len__) are inserted directly after the last ABC explicitly listed in the
    MRO of said class. If two implicit ABCs end up next to each other in the
    resulting MRO, their ordering depends on the order of types in *abcs*.

    �__abstractmethods__rNc3�6�K�|]}t|�����y�wrh)�
issubclass)r��b�bases  �r)r�z_c3_mro.<locals>.<genexpr>�s�����-�()�
�1�d�#�-�s���abcs)�	enumerate�reversed�	__bases__r�r��listr+�anyr �remove�_c3_mror')r]r/�i�boundary�explicit_bases�abstract_bases�other_basesr-�explicit_c3_mros�abstract_c3_mros�
other_c3_mross       `   r)r6r6�s����"�X�c�m�m�4�5����4��4�.�/��3�=�=�)�A�-�H���
���4��:�2�D��#�-�-�	��2�3�N��N��s�}�}�X�Y�/�0�K��(���c�4� ��-�-0�]�]�-�*�

�!�!�$�'�
(�������D���=K�L�T���4�0�L��L�=K�L�T���4�0�L��L�:E�F�$�W�T��-�F�M�F��

����	�+�	,�.;�	<�	��	�*�+�	,�/:�m�	<����M��L��Fs�1E�E"�%E'c	�X����t�j����fd�}�D�cgc]
}||�s�|��c}��fd�}�D�cgc]
}||�r�|��c}�t��}g}�D]�}g}|j�D]B}	|	�vs�t�|	�s�|j	|	jD�
cgc]	}
|
|vs�|
��c}
��D|s|j	|��n|jtd��|D]}	|	D]}||vs�|j	|���!��t�|��Scc}wcc}wcc}
w)z�Calculates the method resolution order for a given class *cls*.

    Includes relevant abstract base classes (with their respective bases) from
    the *types* iterable. Uses a modified C3 linearization algorithm.

    c�j��|�vxr-t|d�xrt|t�xrt�|�S)N�__mro__)r�r�rr+)�typ�basesr]s ��r)�
is_relatedz _compose_mro.<locals>.is_related�s?����5� �:�W�S�)�%<�:�)3�C��)F�%F�:�%/��S�%9�	;r,c�@���D]}||k7s�	||jvs�yy)NTF)rA)rBr4�typess  �r)�is_strict_basez$_compose_mro.<locals>.is_strict_base�s,����	�E��e�|��u�}�}� 4��	�r,T)r��reverser.)�setrA�__subclasses__r+r �sortr�r6)
r]rFrD�nrG�type_set�mrorB�found�subr"�subclsrCs
``          @r)�_compose_mrorR�s2���
�����E�;��/�1��A��Q�/�E��
�7�1�^�A�%6�Q�7�E��5�z�H�
�C��
'�����%�%�'�	H�C��%��J�s�C�$8�������F�A��X�
�a�F�G�	H���J�J�s�O��
�
�
�s�D�
�)��	'�C��
'����$��J�J�v�&�
'�	'�
'��3�S�!�!��7
0��
8��Gs"�
D�D�
D"�D"�(	D'�2D'c��t||j��}d}|D]T}|�I||vrC||jvr5||jvr't||�st	dj||���n	||vs�S|}�V|j
|�S)a^Returns the best matching implementation from *registry* for type *cls*.

    Where there is no registered implementation for a specific type, its method
    resolution order is used to find a more generic implementation.

    Note: if *registry* does not contain an implementation for the base
    *object* type, this function may return None.

    NzAmbiguous dispatch: {} or {})rR�keysrAr+rr�r�)r]�registryrN�match�ts     r)�
_find_implrXs����s�H�M�M�O�
,�C��E�
������X�
�!�3�;�;�"6�"'�s�{�{�":�&0���&:�"�#A�#H�#H��1�$������=��E���<�<���r,c�B�������	�
��ddl�ddl}i�
|j��d����
fd���fd���fd��d
�����	�
fd�	�	��fd�}t|dd	��|�
t<�	|_�|_�j�
�|_�j|_
t||�|S)akSingle-dispatch generic function decorator.

    Transforms a function into a generic function, which can have different
    behaviours depending upon the type of its first argument. The decorated
    function acts as the default implementation, and additional
    implementations can be registered using the register() attribute of the
    generic function.
    rNc������!t�}�|k7r�j�|�	�|}|S#t$r+	�|}n#t$rt|��}YnwxYw|�|<Y|SwxYw)z�generic_func.dispatch(cls) -> <function implementation>

        Runs the dispatch algorithm to return the best available implementation
        for the given *cls* registered on *generic_func*.

        )rr�KeyErrorrX)r]�
current_token�impl�cache_token�dispatch_cacherUs   ���r)�dispatchz singledispatch.<locals>.dispatch2s�����"�+�-�M��m�+��$�$�&�+��	'�!�#�&�D����
�	'�
1���}����
1�!�#�x�0��
1��"&�N�3����
	'�s/�-�	A!�=�A!�A�A!�A�A!� A!c�@��ddlm}m}||�|�jhvS)Nr)�
get_origin�Union)�typingrbrc�	UnionType)r]rbrcrFs   �r)�_is_union_typez&singledispatch.<locals>._is_union_typeIs���,��#��5�%�/�/�":�:�:r,c�v��t|t�ryddlm}�|�xrt	d�||�D��S)NTr��get_argsc3�<K�|]}t|t����y�wrh)r�r/)r��args  r)r�zBsingledispatch.<locals>._is_valid_dispatch_type.<locals>.<genexpr>Rs����C�c�J�s�D�)�C�s�)r�r/rdri�all)r]rirfs  �r)�_is_valid_dispatch_typez/singledispatch.<locals>._is_valid_dispatch_typeMs9����c�4� ��#��s�#�D��C�X�c�]�C�C�	Er,c��������r|����fd�S|�td��d���t�di�}|std��d����}ddlm}t	t||�j
���\}����s,���rtd	|�d
��d���td	|�d
��d������rdd
lm}|��D]}|�|<�	n|��<�	�t�d�r
t��	�
j�|S)z�generic_func.register(cls, func) -> func

        Registers a new implementation for the given *cls* on a *generic_func*.

        c�����|�Srhr�)�fr]�registers ��r)r�z2singledispatch.<locals>.register.<locals>.<lambda>]s����#�q�!1�r,z(Invalid first argument to `register()`. z is not a class or union type.rz(Invalid first argument to `register()`: zS. Use either `@register(some_class)` or plain `@register` on an annotated function.r)�get_type_hintszInvalid annotation for z. z not all arguments are classes.z is not a class.rhr))r~rrdrrr|rzr�rir�rr)
r]r��annrr�argnamerirkrfrmr^r_rqrUs
`      ������r)rqz singledispatch.<locals>.registerTsQ���#�3�'��|�1�1����>��g�;�=����#�0�"�5�C���>�s�g�F0�1���
�D�
.���^�D�%9�%?�%?�%A� B�C�L�G�S�*�3�/�!�#�&�#�1�'��B��'�!@�B���
$�1�'��B��'�!1�3���
�#��'���}�
%�� $���
�
%�!�H�S�M���7�3�0E�#F�)�+�K������r,c�Z��|st��d����|dj�|i|��S)Nz( requires at least 1 positional argumentr)r~r�)r��kwr`�funcnames  ��r)r#zsingledispatch.<locals>.wrapper�sD�����x�j�)4�4�5�
5�+�x��Q��)�)�*�D�7�B�7�7r,rzsingledispatch functionrh)rF�weakref�WeakKeyDictionaryrrZrqr`�MappingProxyTyperUr�_clear_cacher)r�rxr#rfrmr^r`r_rwrqrUrFs   @@@@@@@@@r)r
r
 s�������H��.�.�0�N��K��.;�E�2�2�h8��t�Z�)B�C�H��H�V���G���G���-�-�h�7�G��)�/�/�G���7�D�!��Nr,c�6�eZdZdZd�Zdd�Zdd�Zed��Zy)rz�Single-dispatch generic method descriptor.

    Supports wrapping existing descriptors and handles non-descriptor
    callables as instance methods.
    c�|�t|�st|d�st|�d���t|�|_||_y)Nr�z  is not callable or a descriptor)r�r�r~r
�
dispatcherr��r3r�s  r)rjzsingledispatchmethod.__init__�s8����~�g�d�I�&>��t�h�&F�G�H�H�(��.�����	r,Nc�<�|jj||��S)z�generic_method.register(cls, func) -> func

        Registers a new implementation for the given *cls* on a *generic_method*.
        r�)r~rq)r3r]�methods   r)rqzsingledispatchmethod.register�s��
���'�'��&�'�9�9r,c��������fd�}�j|_�j|_t|�j�|S)Nc����jj|dj�}|j���|i|��Srl)r~r`r�r�)r��kwargsr�r]rfr3s   ���r)r�z-singledispatchmethod.__get__.<locals>._method�s>����_�_�-�-�d�1�g�.?�.?�@�F�+�6�>�>�#�s�+�T�<�V�<�<r,)r�rqrr�)r3rfr]r�s``` r)r�zsingledispatchmethod.__get__�s7���	=�(,�'@�'@��$��=�=����w��	�	�*��r,c�0�t|jdd�Sr�r�r�s r)r�z)singledispatchmethod.__isabstractmethod__�r�r,rh)	rrrrrjrqr�r�r�r�r,r)rr�s,����:���A��Ar,rc�0�eZdZd�Zd�Zdd�Zee�Zy)rc�B�||_d|_|j|_yrh)r��attrnamerrs  r)rjzcached_property.__init__�s����	���
��|�|��r,c��|j�||_y||jk7rtd|j�d|�d���y)Nz?Cannot assign the same cached_property to two different names (z and z).)r�r~)r3�owner�names   r)�__set_name__zcached_property.__set_name__�sM���=�=� � �D�M�
�T�]�]�
"����M�M�$�E�$���5��
�#r,Nc���|�|S|j�td��	|j}|j
|jt�}|tur#|j|�}	|||j<|S|S#t$r3dt	|�j
�d|j�d�}t|�d�wxYw#t$r3dt	|�j
�d|j�d�}t|�d�wxYw)NzGCannot use cached_property instance without calling __set_name__ on it.zNo '__dict__' attribute on z instance to cache z
 property.zThe '__dict__' attribute on z7 instance does not support item assignment for caching )	r�r~rr r/rr��
_NOT_FOUNDr�)r3�instancer�r�msg�vals      r)r�zcached_property.__get__�s �����K��=�=� ��Y�[�
[�	+��%�%�E��i�i��
�
�z�2���*���)�)�H�%�C�
/�'*��d�m�m�$��
�s�
��#�	+�-�d�8�n�.E�.E�-H�I%�%)�]�]�$5�Z�A�
��C�.�d�*�	+���
/�2�4��>�3J�3J�2M�ND�DH�M�M�CT�T^�`�� ��n�$�.�
/�s�A6�#B5�6<B2�5<C1rh)	rrrrjr�r�r�rr�r�r,r)rr�s��$�
��6$�L�1�r,r)r�Frh);r�__all__�abcr�collectionsr�reprlibr�_threadrrFrrrrrr6r9r<rArDrGrKrMrOrSrUrWrYrr�
_functools�ImportErrorrZr{r
rrr�r�r3r�r��strr�r/r�r�r	r�rr'r6rRrXr
rr�rr�r,r)�<module>r�s:�����
 �"�"���=����2�,��>)�#�7�0+�&��*�'��+�&��*�'���+�&��+�&��+�&�(��+�&��+�&��+�&�(��+�&��+�&��+�&�(��+�&��+�&��+�&�(�
���$
�&	�%��8��'7��8	�!�?�?�B	�"�
E2�F�E2�T���%N�
O�
����" ����s���t���>,�\r�h	�-�2��6+�Z("�T�4v�t!A�!A�P�X�
�*2�*2��C�	��	��P�	��	��X�	��	��X	�	��	�sH�D'�D2�/D=�2E�'D/�.D/�2D:�9D:�=E�E�E�E
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!