another problem with the ouput of vim (parent returned NotImplemented)

This commit is contained in:
David Halter
2012-05-15 10:36:45 +02:00
parent 22c3dc11a0
commit 2aa4a1cf8c
2 changed files with 9 additions and 7 deletions

View File

@@ -544,7 +544,10 @@ class Array(object):
return follow_call_list(scope, values)
def get_defined_names(self):
""" This method generates all ArrayElements for one parsing.Array. """
"""
This method generates all ArrayElements for one parsing.Array.
It returns e.g. for a list: append, pop, ...
"""
# array.type is a string with the type, e.g. 'list'
scope = get_scopes_for_name(builtin.Builtin.scope, self._array.type)[0]
names = scope.get_defined_names()
@@ -564,7 +567,7 @@ class ArrayElement(object):
@property
def parent(self):
raise NotImplementedError("This shouldn't happen")
return self.name.parent
@property
def names(self):

View File

@@ -2,7 +2,7 @@
# test comment
import datetime, os, sys, tokenize
import datetime, os, sys, tokenize, re
#from token import *
from time import sleep
from token import OP as OP_TEST, INDENT as INDENT_TEST
@@ -172,10 +172,9 @@ def nexti(iterator, default=list):
#return default
#from temp import *
#exe[0].
#exe[4]['d']
a = next(gen_exe)
a
def ret():
r = []
return r.