Skip to content

Commit

Permalink
[Bug] fix __slots__ in view.py (dmlc#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
lingfanyu authored Dec 3, 2018
1 parent b98dc92 commit b0c76d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/dgl/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NodeView(object):
--------
TBD
"""
__slot__ = '_graph'
__slots__ = ['_graph']

def __init__(self, graph):
self._graph = graph
Expand All @@ -48,7 +48,7 @@ def __call__(self):
return F.arange(0, len(self))

class NodeDataView(MutableMapping):
__slot__ = ['_graph', '_nodes']
__slots__ = ['_graph', '_nodes']

def __init__(self, graph, nodes):
self._graph = graph
Expand Down Expand Up @@ -79,7 +79,7 @@ def __repr__(self):
EdgeSpace = namedtuple('EdgeSpace', ['data'])

class EdgeView(object):
__slot__ = ['_graph']
__slots__ = ['_graph']

def __init__(self, graph):
self._graph = graph
Expand All @@ -102,7 +102,7 @@ def __call__(self, *args, **kwargs):
return self._graph.all_edges(*args, **kwargs)

class EdgeDataView(MutableMapping):
__slot__ = ['_graph', '_edges']
__slots__ = ['_graph', '_edges']

def __init__(self, graph, edges):
self._graph = graph
Expand Down

0 comments on commit b0c76d4

Please sign in to comment.