Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__all__
__dir__
1 parent 1cca72b commit 22fe0a8Copy full SHA for 22fe0a8
1 file changed
IPython/utils/shimmodule.py
@@ -68,6 +68,18 @@ def __path__(self):
68
def __spec__(self):
69
"""Don't produce __spec__ until requested"""
70
return __import__(self._mirror).__spec__
71
+
72
+ def __dir__(self):
73
+ return dir(__import__(self._mirror))
74
75
+ @property
76
+ def __all__(self):
77
+ """Ensure __all__ is always defined"""
78
+ mod = __import__(self._mirror)
79
+ try:
80
+ return mod.__all__
81
+ except AttributeError:
82
+ return [name for name in dir(mod) if not name.startswith('_')]
83
84
def __getattr__(self, key):
85
# Use the equivalent of import_item(name), see below
0 commit comments