
    ce_                        U d Z ddlmZ ddlZddlZddlZddlZej        d         dk    Zej        d         dk    Z	e
fZej        edf         ed<   efZej        edf         ed<   eeefz   Zej        edf         ed	<   d
 Zd Zd Zd ZddZddZd Zej        Ze
j        Zd Zd Zd Z d Z!d Z"d Z# ej$        d          Z% ej$        d          Z& ej$        d          Z'dS )z
Transitional module providing compatibility functions between python 2 and 3.

This module should be fully compatible with:
    * Python >=v2.7
    * Python 3
    )print_functionN23.
TEXT_TYPES	INT_TYPESNUMERIC_TYPESc                 ,    t          | t                    S )z
    Return True if `obj` is a text string, False if it is anything else.

    Binary data (Python 3) or QString (Python 2, PyQt API #1).
    
isinstancestrobjs    Blib/python3.11/site-packages/anaconda_navigator/utils/py3compat.pyis_text_stringr   +   s     c3    c                 ,    t          | t                    S )zDReturn True if obj is a binary string, False if it is anything else.)r   bytesr   s    r   is_binary_stringr   4   s    c5!!!r   c                 >    t          |           pt          |           S )z
    Check if object is a string.

    Return True if `obj` is a text or binary Python string object False if it
    is anything else, like a QString (Python 2, PyQt API #1).
    )r   r   r   s    r   	is_stringr   9   s      #7"23"7"77r   c                 ,    t          | t                    S )z Return True if `obj` is unicode.r
   r   s    r   
is_unicoder   C   s    c3r   c                 r    |t          |           S t          | t                     r| S t          | |          S )z'Convert `obj` to (unicode) text string.)r   r   r   encodings     r   to_text_stringr   H   s:    3xx#s 
sHr   c                 *    t          | |dn|          S )zDConvert `obj` to binary string (bytes in Python 3, str in Python 2).Nzutf-8)r   r   s     r   to_binary_stringr   Q   s    !1ggx@@@r   c                     | S )zReturn string as it is. r   s    r   ur!   V   s    Jr   c                     | |k    | |k     z
  S )z6Return negative if a<b, zero if a==b, positive if a>b.r    )abs     r   cmpr%   c   s    Ea!er   c                     t          t          |                                                                                                                     S )zEConvert QByteArray object to str in a way compatible with Python 2/3.)r   r   toHexdatadecode)qbas    r   qbytearray_to_strr+   h   s8    uSYY[[%%''((//11222r   c                 6    t           | j        di |          S )z.Return an iterator over the dictionary's keys.r    )iterkeysdkws     r   iterkeysr2   q   s    r   c                 6    t           | j        di |          S )z0Return an iterator over the dictionary's values.r    )r-   valuesr/   s     r   
itervaluesr5   v   s    2r   c                 6    t           | j        di |          S )z/Return an iterator over the dictionary's items.r    )r-   itemsr/   s     r   	iteritemsr8   {       "r   c                 6    t           | j        di |          S )z+Return an iterator over a multi dictionary.r    )r-   listsr/   s     r   	iterlistsr<      r9   r   r.   r4   r7   )N)(__doc__
__future__r   typingoperatorossysversionPY2PY3r   r   Tupletype__annotations__intr   floatcomplexr   r   r   r   r   r   r   r!   getcwdlower	str_lowerr%   r+   r2   r5   r8   r<   methodcallerviewkeys
viewvalues	viewitemsr    r   r   <module>rS      s     & % % % % %   				 



 
k!n	k!n
 (+f
FLs# , , ,&)V	6<c	" + + +)2eW5E)Ev|D#I& E E E     " " "
8 8 8     
   A A A A
   
I	  
3 3 3  
     
  
  
 !8 (("X"8,,
!H!'**			r   