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

Added support to list all available object types for the magic function "%psearch". #11672

Merged
merged 4 commits into from May 31, 2019
Merged

Conversation

@k-zen
Copy link
Contributor

@k-zen k-zen commented Apr 4, 2019

These commits add the functionality to list available object types for the %psearch magic. The reason for this modification is the need to know which objects are available for filtering. The documentation is also outdated and commands like:
%psearch a* function produce no results.

The correct command would be:
%psearch a* builtinmethod

Usage of new function:
%psearch -l, produces the following output in Python 3.6.8:

asyncgenerator
builtinfunction
builtinmethod
code
coroutine
frame
function
generator
getsetdescriptor
lambda
mappingproxy
memberdescriptor
method
module
traceback

.gitignore Show resolved Hide resolved
Loading
@Carreau
Copy link
Member

@Carreau Carreau commented Apr 17, 2019

That seem reasonable. Let me wrap my head around that as I haven't used psearch in a while.

But otherwise that seem reasonable.

Loading

IPython/core/magics/namespace.py Show resolved Hide resolved
Loading
IPython/core/oinspect.py Show resolved Hide resolved
Loading
@Carreau
Copy link
Member

@Carreau Carreau commented May 31, 2019

Thanks, apologies for the delay in review and merge.

Loading

@Carreau Carreau merged commit 94a150d into ipython:master May 31, 2019
4 checks passed
Loading
@Carreau Carreau added this to the 7.6 milestone May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants