summaryrefslogtreecommitdiff
path: root/itertoolset.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:07:52 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:07:52 -0400
commit54d7d1efe215337d121813e27cd4909b9a76e912 (patch)
tree7865db28adf2f9328fb9dcbbca8f8f125ecad40c /itertoolset.py
parentfd2e841c4c40f9e46258ac8d11c32c2204cddd5b (diff)
downloadchroma-54d7d1efe215337d121813e27cd4909b9a76e912.tar.gz
chroma-54d7d1efe215337d121813e27cd4909b9a76e912.tar.bz2
chroma-54d7d1efe215337d121813e27cd4909b9a76e912.zip
add linear_extrude() function to make.py. rotate_extrude() now takes the number of rotational steps to extrude instead of the angle step size. updated documention in make.py.
Diffstat (limited to 'itertoolset.py')
-rw-r--r--itertoolset.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/itertoolset.py b/itertoolset.py
index 9d5200c..a20d03b 100644
--- a/itertoolset.py
+++ b/itertoolset.py
@@ -47,3 +47,7 @@ def consume(iterator, n=None):
else:
# advance to the empty slice starting at position n
next(islice(iterator, n, n), None)
+
+def flatten(listOfLists):
+ "Flatten one level of nesting"
+ return chain.from_iterable(listOfLists)