def __repr__(self):
if isinstance(self._ntype, list):
ret = {}
for (i, ntype) in enumerate(self._ntype):
data = self._graph._get_n_repr(self._ntid[i], self._nodes)
value = {key : data[key]
for key in self._graph._node_frames[self._ntid[i]]}
ret[ntype] = value
return repr(ret)
else:
data = self._graph._get_n_repr(self._ntid, self._nodes)
return repr({key : data[key]
After Change
def __repr__(self):
if isinstance(self._ntype, list):
ret = defaultdict(dict)
for (i, ntype) in enumerate(self._ntype):
data = self._graph._get_n_repr(self._ntid[i], self._nodes)
for key in self._graph._node_frames[self._ntid[i]]:
ret[key][ntype] = data[key]