Show More
@@ -969,7 +969,7 b' class InteractiveShell(SingletonConfigurable):' | |||||
969 |
|
969 | |||
970 | # A record of hidden variables we have added to the user namespace, so |
|
970 | # A record of hidden variables we have added to the user namespace, so | |
971 | # we can list later only variables defined in actual interactive use. |
|
971 | # we can list later only variables defined in actual interactive use. | |
972 |
self.user_ns_hidden = |
|
972 | self.user_ns_hidden = {} | |
973 |
|
973 | |||
974 | # Now that FakeModule produces a real module, we've run into a nasty |
|
974 | # Now that FakeModule produces a real module, we've run into a nasty | |
975 | # problem: after script execution (via %run), the module where the user |
|
975 | # problem: after script execution (via %run), the module where the user | |
@@ -1300,7 +1300,8 b' class InteractiveShell(SingletonConfigurable):' | |||||
1300 | # And configure interactive visibility |
|
1300 | # And configure interactive visibility | |
1301 | user_ns_hidden = self.user_ns_hidden |
|
1301 | user_ns_hidden = self.user_ns_hidden | |
1302 | if interactive: |
|
1302 | if interactive: | |
1303 | user_ns_hidden.difference_update(vdict) |
|
1303 | for name in vdict: | |
|
1304 | user_ns_hidden.pop(name, None) | |||
1304 | else: |
|
1305 | else: | |
1305 | user_ns_hidden.update(vdict) |
|
1306 | user_ns_hidden.update(vdict) | |
1306 |
|
1307 |
@@ -265,9 +265,10 b' class NamespaceMagics(Magics):' | |||||
265 |
|
265 | |||
266 | user_ns = self.shell.user_ns |
|
266 | user_ns = self.shell.user_ns | |
267 | user_ns_hidden = self.shell.user_ns_hidden |
|
267 | user_ns_hidden = self.shell.user_ns_hidden | |
|
268 | nonmatching = object() # This can never be in user_ns | |||
268 | out = [ i for i in user_ns |
|
269 | out = [ i for i in user_ns | |
269 | if not i.startswith('_') \ |
|
270 | if not i.startswith('_') \ | |
270 |
and not i |
|
271 | and (user_ns[i] is not user_ns_hidden.get(i, nonmatching)) ] | |
271 |
|
272 | |||
272 | typelist = parameter_s.split() |
|
273 | typelist = parameter_s.split() | |
273 | if typelist: |
|
274 | if typelist: |
General Comments 0
You need to be logged in to leave comments.
Login now