Skip to content

Commit

Permalink
ref #48. makes Dataset more like a duck with extend()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmelz committed Jan 28, 2012
1 parent 7c963a0 commit 54affad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tablib/core.py
Expand Up @@ -597,6 +597,14 @@ def append(self, row, tags=list()):

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`."""
Expand Down

0 comments on commit 54affad

Please sign in to comment.