Skip to content

Commit 9078946

Browse files
committed
FIX: don't expose internals to outside world
Was returning refs to dicts stored in _left at bottom of the stack. This means any mutation to these objects gets reflected back down into the cycler with out any of the keys being updated etc.
1 parent 327de50 commit 9078946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cycler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __getitem__(self, key):
129129

130130
def __iter__(self):
131131
if self._right is None:
132-
return iter(self._left)
132+
return iter(dict(l) for l in self._left)
133133

134134
return self._compose()
135135

0 commit comments

Comments
 (0)