[yoda-svn] yoda: 3 new changesets

YODA Mercurial yoda at projects.hepforge.org
Tue Oct 3 21:00:01 BST 2017


details:   https://yoda.hepforge.org/hg/yoda/rev/3720abf8217e
branches:  
changeset: 1419:3720abf8217e
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Oct 03 17:20:55 2017 +0100
description:
Python3 compatibility

details:   https://yoda.hepforge.org/hg/yoda/rev/09cd7cf9cc80
branches:  
changeset: 1420:09cd7cf9cc80
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Oct 03 20:07:07 2017 +0100
description:
Python3 compatibility

details:   https://yoda.hepforge.org/hg/yoda/rev/8b3c016f3c74
branches:  
changeset: 1421:8b3c016f3c74
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Oct 03 20:13:30 2017 +0100
description:
More Py3 compatibility

diffs (truncated from 461 to 50 lines):

--- a/bin/yodacmp	Tue Oct 03 17:17:04 2017 +0100
+++ b/bin/yodacmp	Tue Oct 03 20:13:30 2017 +0100
@@ -101,10 +101,10 @@
             ## Apply .plot patterns first
             for patt, keys in plotkeys.keys():
                 if re.match(patt, p):
-                    for k, v in keys.iteritems():
+                    for k, v in keys.items():
                         ao.setAnnotation(k, v)
             ## Then command line annotation overrides
-            for k, v in anns.iteritems():
+            for k, v in anns.items():
                 ao.setAnnotation(k, v)
             ## Obsfucate the path for uniqueness
             # TODO: Tidy fname slashes etc. for this purpose
@@ -117,7 +117,7 @@
             ao.setAnnotation("Origin", fname)
             ## Add to plotting dict
             aolists.setdefault(p, []).append(ao)
-    # for p, aos in sorted(aolists.iteritems()): print p, len(aos)
+    # for p, aos in sorted(aolists.items()): print p, len(aos)
 
     ## Apply path pattern match discarding from dict
     opts.PATHPATTERNS = [re.compile(r) for r in opts.PATHPATTERNS] if opts.PATHPATTERNS else []
@@ -137,7 +137,7 @@
                     break
         if not useThis:
             del aolists[path]
-    # for p, aos in sorted(aolists.iteritems()): print p, len(aos)
+    # for p, aos in sorted(aolists.items()): print p, len(aos)
 
 
     ## Loop over unique paths, plotting in order of command-line appearance
@@ -145,7 +145,7 @@
 
 
     ## Now loop over all MC histograms and plot them
-    for path, aos in aolists.iteritems():
+    for path, aos in aolists.items():
 
         ## Find and move the reference plot
         has_ref = False
@@ -162,10 +162,10 @@
         ##
         ## Apply PLOT annotations from command line
         # TODO: also handle .plot file annotations via plotanns?
-        for k, v in plotanns.iteritems():
+        for k, v in plotanns.items():
             plot[k] = v
         ##


More information about the yoda-svn mailing list