summaryrefslogtreecommitdiff
path: root/astroid/node_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/node_classes.py')
-rw-r--r--astroid/node_classes.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/astroid/node_classes.py b/astroid/node_classes.py
index b004785..175de6d 100644
--- a/astroid/node_classes.py
+++ b/astroid/node_classes.py
@@ -1524,6 +1524,12 @@ class Keyword(NodeNG):
class List(_BaseContainer):
"""class representing a List node"""
+ _other_fields = ('ctx',)
+
+ def __init__(self, ctx=None, lineno=None,
+ col_offset=None, parent=None):
+ self.ctx = ctx
+ super(List, self).__init__(lineno, col_offset, parent)
def pytype(self):
return '%s.list' % BUILTINS
@@ -1654,8 +1660,14 @@ class Slice(NodeNG):
class Starred(mixins.ParentAssignTypeMixin, NodeNG):
"""class representing a Starred node"""
_astroid_fields = ('value',)
+ _other_fields = ('ctx', )
value = None
+ def __init__(self, ctx=None, lineno=None, col_offset=None, parent=None):
+ self.ctx = ctx
+ super(Starred, self).__init__(lineno=lineno,
+ col_offset=col_offset, parent=parent)
+
def postinit(self, value=None):
self.value = value
@@ -1663,9 +1675,15 @@ class Starred(mixins.ParentAssignTypeMixin, NodeNG):
class Subscript(NodeNG):
"""class representing a Subscript node"""
_astroid_fields = ('value', 'slice')
+ _other_fields = ('ctx', )
value = None
slice = None
+ def __init__(self, ctx=None, lineno=None, col_offset=None, parent=None):
+ self.ctx = ctx
+ super(Subscript, self).__init__(lineno=lineno,
+ col_offset=col_offset, parent=parent)
+
def postinit(self, value=None, slice=None):
self.value = value
self.slice = slice
@@ -1722,6 +1740,13 @@ class TryFinally(mixins.BlockRangeMixIn, Statement):
class Tuple(_BaseContainer):
"""class representing a Tuple node"""
+ _other_fields = ('ctx',)
+
+ def __init__(self, ctx=None, lineno=None,
+ col_offset=None, parent=None):
+ self.ctx = ctx
+ super(Tuple, self).__init__(lineno, col_offset, parent)
+
def pytype(self):
return '%s.tuple' % BUILTINS