forked from VimPlug/jedi
Fix namedtuple support
There were a couple issues: - namedtuple with one member didn't work - namedtuple content access was never possible - operator.itemgetter didn't work properly. Corrected py__bool__ for FakeSequence Fixes #730.
This commit is contained in:
@@ -511,6 +511,9 @@ class FakeSequence(_FakeArray):
|
||||
def py__iter__(self):
|
||||
return self._lazy_context_list
|
||||
|
||||
def py__bool__(self):
|
||||
return bool(len(self._lazy_context_list))
|
||||
|
||||
def __repr__(self):
|
||||
return "<%s of %s>" % (type(self).__name__, self._lazy_context_list)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user