summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormellort <timothy.mellor@gmail.com>2012-01-28 01:17:15 -0500
committermellort <timothy.mellor@gmail.com>2012-01-28 01:17:15 -0500
commit54affad29205d8667b5ef58c50cad07f94fc9696 (patch)
tree82fb92d905b7b063401281fd8d153edc0a560f72
parent7c963a0f4dc681f4fb086575188c340fefd7a2e5 (diff)
downloadtablib-54affad29205d8667b5ef58c50cad07f94fc9696.tar.gz
ref #48. makes Dataset more like a duck with extend()
-rw-r--r--tablib/core.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tablib/core.py b/tablib/core.py
index 80f4418..46146db 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -597,6 +597,14 @@ class Dataset(object):
self.rpush(row, tags)
+ def extend(self, rows, tags=list()):
+ """Adds a list of rows to the :class:`Dataset` using
+ :class:`Dataset.append`
+ """
+
+ for row in rows:
+ self.append(row, tags)
+
def lpop(self):
"""Removes and returns the first row of the :class:`Dataset`."""