§
    �Ÿj¸  ã                   ó,   — d Z ddlZddlZd„ Zd„ Zd„ ZdS )z:A fancy version of Python's builtin :func:`dir` function.
é    Nc                 ó8   — 	 t          | |¦  «         dS #  Y dS xY w)zfIn recent versions of Python, hasattr() only catches AttributeError.
    This catches all errors.
    TF)Úgetattr)ÚobjÚattrs     ú_/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/IPython/utils/dir2.pyÚsafe_hasattrr      s,   € ðÝ��TÑÔÐØˆtøðØˆuˆuøøøs   ‚ ”c                 ó  — 	 t          t          | ¦  «        ¦  «        }n# t          $ r t          ¦   «         }Y nw xY wt          | d¦  «        r$|t          t          | j        ¦  «        ¦  «        z  }d„ |D ¦   «         }t          |¦  «        S )av  dir2(obj) -> list of strings

    Extended version of the Python builtin dir(), which does a few extra
    checks.

    This version is guaranteed to return only a list of true strings, whereas
    dir() returns anything that objects inject into themselves, even if they
    are later not really valid for attribute access (many extension libraries
    have such bugs).
    Ú	__class__c                 ó<   — g | ]}t          |t          ¦  «        ¯|‘ŒS © )Ú
isinstanceÚstr)Ú.0Úws     r   ú
<listcomp>zdir2.<locals>.<listcomp>2   s'   € Ð4Ð4Ð4�1¥¨A­sÑ!3Ô!3Ð4ˆQÐ4Ð4Ð4ó    )ÚsetÚdirÚ	Exceptionr   r
   Úsorted)r   Úwordss     r   Údir2r      s“   € ðÝ•C˜‘H”H‘”ˆˆøÝð ð ð å‘”ˆˆˆðøøøõ �C˜Ñ%Ô%ð )Ø••S˜œÑ'Ô'Ñ(Ô(Ñ(ˆð
 5Ð4˜Ð4Ñ4Ô4€EÝ�%‰=Œ=Ðs   ‚ Ÿ:¹:c                 ó   — 	 t          | dd¦  «        }n# t          $ r Y dS w xY w|�dS 	 t          | |d¦  «        }n# t          $ r Y dS w xY wt          j        | ¦  «        rt	          |t
          j        ¦  «        sdS t          |¦  «        r|S dS )aE  Like getattr, but with a few extra sanity checks:

    - If obj is a class, ignore everything except class methods
    - Check if obj is a proxy that claims to have all attributes
    - Catch attribute access failing with any exception
    - Check that the attribute is a callable object

    Returns the method or None.
    Ú(_ipython_canary_method_should_not_exist_N)r   r   ÚinspectÚisclassr   ÚtypesÚ
MethodTypeÚcallable)r   ÚnameÚcanaryÚms       r   Úget_real_methodr#   6   sÉ   € ðÝ˜ÐHÈ$ÑOÔOˆˆøÝð ð ð Øˆtˆtðøøøð ÐàˆtðÝ�C˜˜tÑ$Ô$ˆˆøÝð ð ð Øˆtˆtðøøøõ „�sÑÔð ¥J¨qµ%Ô2BÑ$CÔ$Cð Øˆtå��{„{ð Øˆàˆ4s   ‚ ”
"¡"ª< ¼
A
Á	A
)Ú__doc__r   r   r   r   r#   r   r   r   ú<module>r%      sZ   ððð ð €€€Ø €€€ðð ð ðð ð ð>ð ð ð ð r   