문제

I'm looking for an extension which will help in Python's auto complete feature in Python.

If I type the following code:

a = [4,5,6]
a.p

Then I expect it would give me a suggestion for pop as it is one of the method of Python list. Is this thing achievable in Emacs?

I tried installing Rope, Rope mode, Ropemacs and Pymacs. The auto-complete suggestion, I get from that aren't the methods of list. But it suggests me something like print etc. Am I doing something wrong ?

도움이 되었습니까?

해결책

Try Jedi.el. AFAIK, it should support your example.

다른 팁

Because Python variables don't have types, it is difficult to know what class of object a variable would contain at a given point in your code. Imagine if your code later did a = 1. Emacs would have to know when the variable a refers to a list and when it refers to a number in order to offer the correct completion. Generally this is not possible without actually running the code.

Works for me with vimrope from https://github.com/python-rope/ropevim/ (now, the official home of all rope projects)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top