Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard reset #334

Merged
merged 4 commits into from Apr 7, 2011
Merged

Hard reset #334

merged 4 commits into from Apr 7, 2011

Conversation

takluyver
Copy link
Member

As requested in issue #49, this is a "hard reset", which should release any references we have to things, and completely reset the shell.

I've implemented this with a -h option to %reset. I've left %reset just clearing the user namespace by default. If this was being written from scratch, I think I would make %reset do a hard reset by default, but a soft reset is consistent with what it was already doing.

@fperez
Copy link
Member

fperez commented Apr 7, 2011

We're changing enough things in 0.11 that changing defaults to more sensible/useful behavior is within bounds (e.g. we did that already for %history, where now numbers are NOT the default anymore). So feel free to change it to the more sensible default, perhaps just adding a '-soft' option or '-user' for user namespace-only cleanup.

@takluyver
Copy link
Member Author

OK, done!

@fperez
Copy link
Member

fperez commented Apr 7, 2011

BTW, is this clearing _NN, _iNN and _oNN variables?

@takluyver
Copy link
Member Author

Yes. InteractiveShell.reset() completely nukes the user namespace (except
for builtin and builtins, which you special cased).

@takluyver takluyver merged commit 3818b41 into ipython:master Apr 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants