Skip to content

Commit

Permalink
Add str support in iterate.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinganc committed Jul 24, 2024
1 parent d4c6e29 commit 84dceb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opto/trace/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def iterate(x: Any):
""" Return an iterator object for node of list, tuple, set, or dict. """
if not isinstance(x, Node):
x = node(x)
if issubclass(x.type, list) or issubclass(x.type, tuple):
if issubclass(x.type, list) or issubclass(x.type, tuple) or issubclass(x.type, str):
return SeqIterable(x)
elif issubclass(x.type, set):
converted_list = ops.to_list(x)
Expand Down

0 comments on commit 84dceb9

Please sign in to comment.