[IPython-dev] IPyAutocall-like dispatching with simplegeneric

Ville M. Vainio vivainio at gmail.com
Wed May 16 12:22:14 EDT 2007


And the stream of consciousness goes ever on...

We could also use a generic function for custom completers, something like:

@generic
def ipycomplete(item, event):
 raise TryNext


cd = object()

@ipycomplete.when_object(cd):
def complete_cd(item, event):
 # return a list of dirs, like with current custom cd completers...
 ...

This would again allow more elegant way to add completers than the
current registration approach.

Of course objects like this 'cd' should not be shows by %whos in order
to not confuse the user with too many variables.



More information about the IPython-dev mailing list