mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
changing syntax of checking for row and col values in append(); slightly more robust this way
This commit is contained in:
+2
-2
@@ -173,10 +173,10 @@ class Dataset(object):
|
||||
|
||||
def append(self, row=None, col=None):
|
||||
"""Adds a row to the end of Dataset"""
|
||||
if row:
|
||||
if row is not None:
|
||||
self._validate(row)
|
||||
self._data.append(tuple(row))
|
||||
elif col:
|
||||
elif col is not None:
|
||||
self._validate(col=col)
|
||||
|
||||
if self.headers:
|
||||
|
||||
Reference in New Issue
Block a user