[Yt-svn] yt-commit r1168 - in trunk/yt/lagos: . hop

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Fri Feb 13 14:02:14 PST 2009


Author: mturk
Date: Fri Feb 13 14:02:13 2009
New Revision: 1168
URL: http://yt.spacepope.org/changeset/1168

Log:
We should be able to ditch the getter methods now.



Modified:
   trunk/yt/lagos/ParallelTools.py
   trunk/yt/lagos/hop/SS_HopOutput.py

Modified: trunk/yt/lagos/ParallelTools.py
==============================================================================
--- trunk/yt/lagos/ParallelTools.py	(original)
+++ trunk/yt/lagos/ParallelTools.py	Fri Feb 13 14:02:13 2009
@@ -133,8 +133,11 @@
     def __init__(cls, name, bases, d):
         super(ParallelDummy, cls).__init__(name, bases, d)
         skip = d.pop("dont_wrap", [])
+        extra = d.pop("extra_wrap", [])
         for attrname in d:
-            if attrname.startswith("_") or attrname in skip: continue
+            if attrname.startswith("_") or attrname in skip:
+                if attrname not in extra: continue
+            print "Wrapping", attrname
             attr = getattr(cls, attrname)
             if type(attr) == types.MethodType:
                 setattr(cls, attrname, parallel_simple_proxy(attr))

Modified: trunk/yt/lagos/hop/SS_HopOutput.py
==============================================================================
--- trunk/yt/lagos/hop/SS_HopOutput.py	(original)
+++ trunk/yt/lagos/hop/SS_HopOutput.py	Fri Feb 13 14:02:13 2009
@@ -157,6 +157,7 @@
     _owner = 0
     indices = None
     dont_wrap = ["get_sphere"]
+    extra_wrap = ["__getitem__"]
 
     def __init__(self, hop_output, id, indices = None):
         self.hop_output = hop_output



More information about the yt-svn mailing list