diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-06-21 20:02:12 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-06-21 20:02:12 -0400 |
| commit | 39b66ad8e9b4edf3862fe7714362c56d476b5ef0 (patch) | |
| tree | 317136d13b42abc31a5ae7aa3cda06ebd34dd789 | |
| parent | 004b3da680b821d0dcedbe52ee6fb5a2a45c9ad5 (diff) | |
| download | tablib-39b66ad8e9b4edf3862fe7714362c56d476b5ef0.tar.gz | |
add row pop
| -rw-r--r-- | tablib/core.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tablib/core.py b/tablib/core.py index 9c561fd..054d542 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -571,6 +571,15 @@ class Dataset(object): 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 # ------- |
