mailr15928 - /branches/uf_redesign/user_functions/objects.py


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

Header


Content

Posted by edward on May 03, 2012 - 21:45:
Author: bugman
Date: Thu May  3 21:45:47 2012
New Revision: 15928

URL: http://svn.gna.org/viewcvs/relax?rev=15928&view=rev
Log:
The user function container args variable is now private and modifiable.

It needs to be modifiable so the __init__ method can initialise it.


Modified:
    branches/uf_redesign/user_functions/objects.py

Modified: branches/uf_redesign/user_functions/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/objects.py?rev=15928&r1=15927&r2=15928&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/objects.py (original)
+++ branches/uf_redesign/user_functions/objects.py Thu May  3 21:45:47 2012
@@ -48,7 +48,7 @@
 
     @ivar title:            The long title of the user function.
     @ivar title_short:      The optional short title.
-    @ivar args:             The list of argument details.
+    @ivar _args:            The list of argument details.
     @ivar backend:          The user function back end.  This should be a 
string version with full module path of the function which executes the back 
end.  For example 'generic_fns.pipes.create'.  Note, this should be 
importable as __import__(backend)!
     @ivar desc:             The full, multi-paragraph description.
     @ivar prompt_examples:  The examples of how to use the prompt front end.
@@ -58,6 +58,7 @@
     __mod_attr__ = [
             'title',
             'title_short',
+            '_args',
             'backend',
             'desc',
             'prompt_examples'
@@ -70,7 +71,7 @@
         # Initialise the variables for all user functions.
         self.title = None
         self.title_short = None
-        self.args = []
+        self._args = []
         self.backend = None
         self.desc = None
         self.prompt_examples = None
@@ -121,8 +122,8 @@
             raise RelaxError("The 'desc' argument must be supplied.")
 
         # Append a new argument dictionary to the list, and alias it.
-        self.args.append({})
-        arg = self.args[-1]
+        self._args.append({})
+        arg = self._args[-1]
 
         # Add the data.
         arg['name'] = name




Related Messages


Powered by MHonArc, Updated Thu May 03 22:20:02 2012