Skip to content

Commit

Permalink
add row pop
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Jun 22, 2011
1 parent 004b3da commit 39b66ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tablib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,15 @@ def append(self, row, tags=list()):
self.rpush(row, tags)


def pop(self):
"""Removes and returns the last row of the :class:`Dataset`."""

cache = self[-1]
del self[-1]

return cache


# -------
# Columns
# -------
Expand Down

0 comments on commit 39b66ad

Please sign in to comment.