summaryrefslogtreecommitdiff
path: root/grc/python/Param.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/python/Param.py')
-rw-r--r--grc/python/Param.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/grc/python/Param.py b/grc/python/Param.py
index f62a33550..5536138c1 100644
--- a/grc/python/Param.py
+++ b/grc/python/Param.py
@@ -293,25 +293,22 @@ class Param(_Param, _GUIParam):
if not isinstance(e, VECTOR_TYPES):
self._lisitify_flag = True
e = [e]
- for ei in e:
- if not isinstance(ei, COMPLEX_TYPES):
- raise Exception, 'Expression "%s" is invalid for type complex vector.'%str(e)
+ if not all([isinstance(ei, COMPLEX_TYPES) for ei in e]):
+ raise Exception, 'Expression "%s" is invalid for type complex vector.'%str(e)
return e
elif t == 'real_vector':
if not isinstance(e, VECTOR_TYPES):
self._lisitify_flag = True
e = [e]
- for ei in e:
- if not isinstance(ei, REAL_TYPES):
- raise Exception, 'Expression "%s" is invalid for type real vector.'%str(e)
+ if not all([isinstance(ei, REAL_TYPES) for ei in e]):
+ raise Exception, 'Expression "%s" is invalid for type real vector.'%str(e)
return e
elif t == 'int_vector':
if not isinstance(e, VECTOR_TYPES):
self._lisitify_flag = True
e = [e]
- for ei in e:
- if not isinstance(ei, INT_TYPES):
- raise Exception, 'Expression "%s" is invalid for type integer vector.'%str(e)
+ if not all([isinstance(ei, INT_TYPES) for ei in e]):
+ raise Exception, 'Expression "%s" is invalid for type integer vector.'%str(e)
return e
#########################
# String Types