I have found a strange behavior in Vim when I attempt to use autocompletion on objects. If I instantiate the objects on a module level, the Vim autocompletion will work on the instance I create:

If I try the same from within a function or class, it is no longer working:

Does anyone know how to fix this, or is there a way to get omnicompletion to work on instances in a non module-scope?
Even though it does not use Vim’s omnicompletion plugin, by using rope, ropemode and ropevim it is possible to get autocompletion in methods:
Even though not really exactly what I wanted it works pretty well.
I got it working like so:
I installed the ropevim distribution from here and added the following lines to my
.vimrcfile:Now pressing Ctrl+Space will bring up the rope completion menu.