Show More
@@ -96,6 +96,7 b' def demandload(scope, modules):' | |||||
96 |
|
96 | |||
97 | foo import foo |
|
97 | foo import foo | |
98 | foo bar import foo, bar |
|
98 | foo bar import foo, bar | |
|
99 | foo@bar import foo as bar | |||
99 | foo.bar import foo.bar |
|
100 | foo.bar import foo.bar | |
100 | foo:bar from foo import bar |
|
101 | foo:bar from foo import bar | |
101 | foo:bar,quux from foo import bar, quux |
|
102 | foo:bar,quux from foo import bar, quux | |
@@ -108,6 +109,9 b' def demandload(scope, modules):' | |||||
108 | mod = mod[:col] |
|
109 | mod = mod[:col] | |
109 | else: |
|
110 | else: | |
110 | fromlist = [] |
|
111 | fromlist = [] | |
|
112 | as = None | |||
|
113 | if '@' in mod: | |||
|
114 | mod, as = mod.split("@") | |||
111 | importer = _importer(scope, mod, fromlist) |
|
115 | importer = _importer(scope, mod, fromlist) | |
112 | if fromlist: |
|
116 | if fromlist: | |
113 | for name in fromlist: |
|
117 | for name in fromlist: | |
@@ -126,4 +130,6 b' def demandload(scope, modules):' | |||||
126 | continue |
|
130 | continue | |
127 | else: |
|
131 | else: | |
128 | basemod = mod |
|
132 | basemod = mod | |
129 | scope[basemod] = _replacer(importer, basemod) |
|
133 | if not as: | |
|
134 | as = basemod | |||
|
135 | scope[as] = _replacer(importer, as) |
General Comments 0
You need to be logged in to leave comments.
Login now