
    <h                     *    S r SSKrSSKrS rS rS rg)z9A fancy version of Python's builtin :func:`dir` function.    Nc                 *     [        X5        g!    g= f)z^In recent versions of Python, hasattr() only catches AttributeError.
This catches all errors.
TF)getattr)objattrs     eC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\IPython/utils/dir2.pysafe_hasattrr      s    s    c                 6    [        [        U 5      5      n[        U S5      (       a!  U[        [        U R                  5      5      -  nU Vs/ s H  n[        U[        5      (       d  M  UPM     nn[        U5      $ ! [         a    [        5       n N|f = fs  snf )aZ  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__)setdir	Exceptionr   r
   
isinstancestrsorted)r   wordsws      r   dir2r      s    CH
 C%%S'((
 41As!3QE4%=   5s   A< B)B<BBc                     [        U SS5      nUb  g [        XS5      n[        R                  " U 5      (       a   [	        U[
        R                  5      (       d  g[        U5      (       a  U$ g! [         a     gf = f! [         a     gf = f)a-  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   5   s    H$O Ct$ sJq%2B2B$C$C{{%    s"   A. A> .
A;:A;>
B
B)__doc__r   r   r   r   r        r   <module>r"      s    ?
  >r!   