Skip to content

Commit 30c4a76

Browse files
RPINerdpeterjc
authored andcommitted
Fix a couple depreciated examples
itertools no longer uses *.next() call izip() is depreciated and replaced by built in zip()
1 parent f0c2aaf commit 30c4a76

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wiki/Phylo_cookbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def terminal_neighbor_dists(self):
114114

115115
def generate_pairs(self):
116116
pairs = itertools.tee(self)
117-
pairs[1].next()
118-
return itertools.izip(pairs[0], pairs[1])
117+
next(pairs[1])
118+
return zip(pairs[0], pairs[1])
119119

120120
return [self.distance(*i) for i in generate_pairs(self.find_clades(terminal=True))]
121121
```

0 commit comments

Comments
 (0)