##// END OF EJS Templates
Merge pull request #13213 from Kojoley/fix-bunch-of-doctests...
Merge pull request #13213 from Kojoley/fix-bunch-of-doctests Fix bunch of doctests

File last commit:

r26419:7663c521
r26940:32497c8d merge
Show More
generics.py
29 lines | 706 B | text/x-python | PythonLexer
Brian Granger
Work to address the review comments on Fernando's branch....
r2498 # encoding: utf-8
Brian Granger
Continuing a massive refactor of everything.
r2205 """Generic functions for extending IPython.
"""
vivainio
crlf normalization
r851
Brian Granger
Continuing a massive refactor of everything.
r2205 from IPython.core.error import TryNext
Hugo
Replace simplegeneric.generic with functools.singledispatch
r24687 from functools import singledispatch
Brian Granger
Work to address the review comments on Fernando's branch....
r2498
Hugo
Replace simplegeneric.generic with functools.singledispatch
r24687 @singledispatch
vivainio
crlf normalization
r851 def inspect_object(obj):
Brian Granger
Continuing a massive refactor of everything.
r2205 """Called when you do obj?"""
vivainio
crlf normalization
r851 raise TryNext
vivainio
implement complete_object(obj, prev_completions) generic function to provide custom completers for python object attributes (as opposed to string dispatching)
r908
Brian Granger
Work to address the review comments on Fernando's branch....
r2498
Hugo
Replace simplegeneric.generic with functools.singledispatch
r24687 @singledispatch
vivainio
implement complete_object(obj, prev_completions) generic function to provide custom completers for python object attributes (as opposed to string dispatching)
r908 def complete_object(obj, prev_completions):
Brian Granger
Continuing a massive refactor of everything.
r2205 """Custom completer dispatching for python objects.
Parameters
----------
obj : object
The object to complete.
prev_completions : list
List of attributes discovered so far.
vivainio
implement complete_object(obj, prev_completions) generic function to provide custom completers for python object attributes (as opposed to string dispatching)
r908 This should return the list of attributes in obj. If you only wish to
Bernardo B. Marques
remove all trailling spaces
r4872 add to the attributes already discovered normally, return
vivainio
implement complete_object(obj, prev_completions) generic function to provide custom completers for python object attributes (as opposed to string dispatching)
r908 own_attrs + prev_completions.
"""
raise TryNext