diff --git a/pyp3 b/pyp3 index ec29ebe..ff7b28c 100755 --- a/pyp3 +++ b/pyp3 @@ -1351,7 +1351,8 @@ class Pyp(object): @type iterables: list ''' out = [] - if '__iter__' in dir(iterables) or type(iterables) in [list, PowerPipeList,tuple,PypList]: + safe_iterables = [list, PowerPipeList,tuple,PypList] + if type(iterables) in safe_iterables: #expand history objects if [x for x in iterables if type(x) in [HistoryObject]]: @@ -1363,7 +1364,7 @@ class Pyp(object): iterables = expanded_iterables #if [x for x in iterables if type(x) in [str, PypStr,HistoryObject,type,int,float]]: - if [x for x in iterables if type(x) not in [list,PowerPipeList,tuple,PypList]]: #str,int,etc + if [x for x in iterables if type(x) not in safe_iterables]: #str,int,etc out = out + iterables #add the lists and be done else: