make data_append() coping with any iterable data type (not just list)

This commit is contained in:
Philip Eisenlohr 2013-11-25 18:58:27 +00:00
parent cf65505eea
commit 05fa8bf580
1 changed files with 3 additions and 2 deletions

View File

@ -210,9 +210,10 @@ class ASCIItable():
# ------------------------------------------------------------------
def data_append(self,
what):
if isinstance(what,list):
try:
for item in what: self.data_append(item)
else: self.data += [str(what)]
except TypeError:
self.data += [str(what)]
# ------------------------------------------------------------------
def data_set(self,