mailr16426 - /branches/uf_redesign/prompt/interpreter.py


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

Header


Content

Posted by edward on May 24, 2012 - 09:10:
Author: bugman
Date: Thu May 24 09:10:47 2012
New Revision: 16426

URL: http://svn.gna.org/viewcvs/relax?rev=16426&view=rev
Log:
The prompt UI versions of the auto-generated user functions are now stored in 
self._uf_dict.

This is a dictionary whereby the keys are the full user function names as 
text.  This is designed
for speed, so that the user function object can be retrieved much faster.


Modified:
    branches/uf_redesign/prompt/interpreter.py

Modified: branches/uf_redesign/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/interpreter.py?rev=16426&r1=16425&r2=16426&view=diff
==============================================================================
--- branches/uf_redesign/prompt/interpreter.py (original)
+++ branches/uf_redesign/prompt/interpreter.py Thu May 24 09:10:47 2012
@@ -177,6 +177,7 @@
             objects[name] = obj
 
         # Add the user functions.
+        self._uf_dict = {}
         for name, data in uf_info.uf_loop():
             # Split up the name.
             if search('\.', name):
@@ -196,6 +197,9 @@
                 setattr(class_obj, uf_name, obj)
             else:
                 objects[name] = obj
+
+            # Store the user functions by full text name (for faster 
retrieval).
+            self._uf_dict[name] = obj
 
         # Return the dictionary.
         return objects




Related Messages


Powered by MHonArc, Updated Thu May 24 10:00:02 2012