diff options
| author | mellort <timothy.mellor@gmail.com> | 2012-01-28 01:17:15 -0500 |
|---|---|---|
| committer | mellort <timothy.mellor@gmail.com> | 2012-01-28 01:17:15 -0500 |
| commit | 54affad29205d8667b5ef58c50cad07f94fc9696 (patch) | |
| tree | 82fb92d905b7b063401281fd8d153edc0a560f72 /tablib/core.py | |
| parent | 7c963a0f4dc681f4fb086575188c340fefd7a2e5 (diff) | |
| download | tablib-54affad29205d8667b5ef58c50cad07f94fc9696.tar.gz | |
ref #48. makes Dataset more like a duck with extend()
Diffstat (limited to 'tablib/core.py')
| -rw-r--r-- | tablib/core.py | 8 |
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`.""" |
