mailr4246 - /1.3/prompt/value.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 02, 2008 - 14:59:
Author: bugman
Date: Wed Jan  2 14:59:35 2008
New Revision: 4246

URL: http://svn.gna.org/viewcvs/relax?rev=4246&view=rev
Log:
Updated the value.set() user function.

More comments were added to the code, and empty lists passed in as the param 
argument are now
checked for.


Modified:
    1.3/prompt/value.py

Modified: 1.3/prompt/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/value.py?rev=4246&r1=4245&r2=4246&view=diff
==============================================================================
--- 1.3/prompt/value.py (original)
+++ 1.3/prompt/value.py Wed Jan  2 14:59:35 2008
@@ -380,8 +380,11 @@
         if val != None and type(val) != float and type(val) != int and 
type(val) != list:
             raise RelaxNoneFloatListError, ('value', val)
         if type(val) == list:
+            # Empty list.
             if val == []:
                 raise RelaxListFloatError, ('value', val)
+
+            # Check for values.
             for i in xrange(len(val)):
                 if type(val[i]) != float and type(val[i]) != int:
                     raise RelaxListFloatError, ('value', val)
@@ -390,6 +393,11 @@
         if param != None and type(param) != str and type(param) != list:
             raise RelaxNoneStrListError, ('parameter', param)
         if type(param) == list:
+            # Empty list.
+            if param == []:
+                raise RelaxListStrError, ('parameter', param)
+
+            # Check for strings.
             for i in xrange(len(param)):
                 if type(param[i]) != str:
                     raise RelaxListStrError, ('parameter', param)




Related Messages


Powered by MHonArc, Updated Wed Jan 02 15:20:28 2008