Skip to content

Commit

Permalink
try to get iterator working in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jtauber committed Mar 19, 2016
1 parent 2f39598 commit 3b5c23c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ def output(self, f):


class NodeIterator:

def __init__(self, game_tree):
self.node = game_tree.nodes[0]

def __iter__(self):
return self

def next(self):
if self.node:
node = self.node
Expand Down

0 comments on commit 3b5c23c

Please sign in to comment.