projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f53acb9
)
fhdl/tools/flat_iteration: generalize
author
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Sat, 9 Mar 2013 22:03:15 +0000
(23:03 +0100)
committer
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Sat, 9 Mar 2013 22:03:15 +0000
(23:03 +0100)
migen/fhdl/tools.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/tools.py
b/migen/fhdl/tools.py
index f9cb67c74ee99ee6960d3099ecb0f805dbe60d31..f7b50fd7dbdade8172c33624d80125e6eba983be 100644
(file)
--- a/
migen/fhdl/tools.py
+++ b/
migen/fhdl/tools.py
@@
-1,10
+1,12
@@
+import collections
+
from migen.fhdl.structure import *
from migen.fhdl.structure import _Operator, _Slice, _Assign, _ArrayProxy
from migen.fhdl.visit import NodeVisitor, NodeTransformer
def flat_iteration(l):
for element in l:
- if isinstance(element,
(list, tuple)
):
+ if isinstance(element,
collections.Iterable
):
for element2 in flat_iteration(element):
yield element2
else: