##// END OF EJS Templates
Shaperilio/autoreload verbosity (#13774)...
Shaperilio/autoreload verbosity (#13774) Worked on three things: 1. More descriptive parameter names for `%autoreload`; `now`, `off`, `explicit`, `all`, `complete`. (This last one could probably use a better name, but I couldn't think of anything better based on the message in 1d3018a93e98ad55f41d4419f835b738de80e1b7) 2. New optional arguments for `%autoreload` allow displaying the names of modules that are reloaded. Use `--print` or `-p` to use `print` statements, or `--log` / `-l` to log at `INFO` level. 3. `%aimport` can parse whitelist/blacklist modules on the same line, e.g. `%aimport os, -math` now works. `%autoreload` and will also now raise a `ValueError` if the parameter is invalid. I suppose a bit more verification could be done for input to `%aimport`....

File last commit:

r26419:7663c521
r28121:0725b4e7 merge
Show More
generics.py
29 lines | 706 B | text/x-python | PythonLexer
# encoding: utf-8
"""Generic functions for extending IPython.
"""
from IPython.core.error import TryNext
from functools import singledispatch
@singledispatch
def inspect_object(obj):
"""Called when you do obj?"""
raise TryNext
@singledispatch
def complete_object(obj, prev_completions):
"""Custom completer dispatching for python objects.
Parameters
----------
obj : object
The object to complete.
prev_completions : list
List of attributes discovered so far.
This should return the list of attributes in obj. If you only wish to
add to the attributes already discovered normally, return
own_attrs + prev_completions.
"""
raise TryNext