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.
1 parent 224d379 commit bc49bc7Copy full SHA for bc49bc7
python/ql/test/library-tests/modules/__all__/main.py
@@ -17,6 +17,10 @@
17
print(" foo={!r}".format(foo))
18
print(" bar={!r}".format(bar))
19
print(" baz={!r}".format(baz))
20
+try:
21
+ print(" _qux={!r}".format(_qux))
22
+except NameError:
23
+ print(" _qux not imported")
24
del foo, bar, baz
25
26
from all_list import *
@@ -82,3 +86,5 @@
82
86
print(" foo={!r}".format(mod.foo))
83
87
print(" bar={!r}".format(mod.bar))
84
88
print(" baz={!r}".format(mod.baz))
89
+
90
+print("\nspecial: no_all._qux={!r}".format(no_all._qux))
python/ql/test/library-tests/modules/__all__/no_all.py
@@ -1,3 +1,5 @@
1
foo = "foo"
2
bar = "bar"
3
baz = "baz"
4
+# When `__all__` is not defined, names starting with underscore is not imported with `from <module> import *`
5
+_qux = "qux"
0 commit comments