Delete a variable, trying to clear it from anywhere that IPython's machinery has references to it. By default, this uses the identity of the named object in the user namespace to remove references held under other names. The object is also removed from the output hist
(self, parameter_s='')
| 691 | |
| 692 | @line_magic |
| 693 | def xdel(self, parameter_s=''): |
| 694 | """Delete a variable, trying to clear it from anywhere that |
| 695 | IPython's machinery has references to it. By default, this uses |
| 696 | the identity of the named object in the user namespace to remove |
| 697 | references held under other names. The object is also removed |
| 698 | from the output history. |
| 699 | |
| 700 | Options |
| 701 | -n : Delete the specified name from all namespaces, without |
| 702 | checking their identity. |
| 703 | """ |
| 704 | opts, varname = self.parse_options(parameter_s,'n') |
| 705 | try: |
| 706 | self.shell.del_var(varname, ('n' in opts)) |
| 707 | except (NameError, ValueError) as e: |
| 708 | print(type(e).__name__ +": "+ str(e)) |
nothing calls this directly
no test coverage detected