This documentation is for an old version of IPython. You can find docs for newer versions here.
Client-side completion machinery.
How it works: self.complete will be called multiple times, with state=0,1,2,... When state=0 it should compute ALL the completion matches, and then return them for each value of state.