← Back
Editing: dir2.cpython-311.pyc
� �@�c� � �, � d Z ddlZddlZd� Zd� Zd� ZdS )z:A fancy version of Python's builtin :func:`dir` function. � Nc �8 � t | |� � dS # Y dS xY w)zfIn recent versions of Python, hasattr() only catches AttributeError. This catches all errors. TF)�getattr)�obj�attrs �4/usr/lib/python3/dist-packages/IPython/utils/dir2.py�safe_hasattrr s, � ����T�����t����u�u���s � �c � � t t | � � � � }n# t $ r t � � }Y nw xY wt | 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 �<