make data_append() coping with any iterable data type (not just list)
This commit is contained in:
parent
cf65505eea
commit
05fa8bf580
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue