Changeset 686 for mds-and-trees


Ignore:
Timestamp:
09/03/17 16:23:17 (7 years ago)
Author:
Maciej Komosinski
Message:

Made loop iteration variable implicit ("enumerate")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mds-and-trees/tree-genealogy.py

    r685 r686  
    447447                            0 if q == 0 else max([self.props["depth"][d] for d in self.tree.parents[q]]))
    448448
    449         node_counter = 0
    450449        start_time = timelib.time()
    451450
    452451        # for each child of the current node
    453         for child in visiting_order:
    454             node_counter += 1
    455 
     452        for node_counter,child in enumerate(visiting_order, start=1):
    456453            # debug info - elapsed time
    457454            if node_counter % 100000 == 0:
Note: See TracChangeset for help on using the changeset viewer.