Changes between Initial Version and Version 1 of Ticket #26407, comment 2
- Timestamp:
- May 8, 2016, 8:01:45 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26407, comment 2
initial v1 13 13 + def reduce(self): 14 14 + for xkey, xnode in six.iteritems(self.node_map): 15 + # print('xkey: %s' % (xkey,))16 15 + for ykey, ynode in six.iteritems(self.node_map): 17 + # print('ykey: %s' % (ykey,))18 16 + if xkey == ykey: 19 17 + continue 20 18 + for zkey, znode in six.iteritems(self.node_map): 21 + # print('zkey: %s' % (zkey,))22 19 + if xkey == zkey or ykey == zkey: 23 20 + continue 24 21 + if znode in xnode.children and ynode in xnode.children and znode in ynode.children: 25 + print("rm %(xkey)s -> %(zkey)s : %(xkey)s -> %(ykey)s -> %(zkey)s" % {26 + 'xkey': xkey,27 + 'ykey': ykey,28 + 'zkey': zkey,29 + })30 22 + xnode.children.discard(znode) 31 23 + znode.parents.discard(xnode)