jonathanslenders/python-prompt-toolkit — pull request #24 by welbornprod (2014-09-30 18:46:06+00:00)
Title: Fix Issue #9, bad syntax causes jedi completions() to fail.

It's hard for me to track what's going on inside jedi, or which value is causing this error on initialization of `Completion(self._evaluator, c, needs_dot, len(like), s)`. I would need to study the `jedi` source a bit more, but catching this `TypeError` in `python_input.get_completions()` prevents Issue #9 from happening, and saves the auto-completion. Basically, just let `PythonCompleter` fail gracefully when `.completions()` fails.