mailr15190 - /branches/spec_api/specific_fns/api_objects.py


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

Header


Content

Posted by edward on January 19, 2012 - 11:33:
Author: bugman
Date: Thu Jan 19 11:33:48 2012
New Revision: 15190

URL: http://svn.gna.org/viewcvs/relax?rev=15190&view=rev
Log:
The Param_list.get_units() method can now handle function type objects.

This is needed for the model-free Rex parameter.


Modified:
    branches/spec_api/specific_fns/api_objects.py

Modified: branches/spec_api/specific_fns/api_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spec_api/specific_fns/api_objects.py?rev=15190&r1=15189&r2=15190&view=diff
==============================================================================
--- branches/spec_api/specific_fns/api_objects.py (original)
+++ branches/spec_api/specific_fns/api_objects.py Thu Jan 19 11:33:48 2012
@@ -173,5 +173,9 @@
         if name not in self._names:
             raise RelaxError("The parameter '%s' does not exist." % name)
 
+        # Function.
+        if isinstance(self._units[name], FunctionType):
+            return self._units[name]()
+
         # Return the value.
         return self._units[name]




Related Messages


Powered by MHonArc, Updated Thu Jan 19 11:40:02 2012