1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: Python 3 print statements
Fix up the print statements for Python 3.
Author: https://github.com/jkrueger1
Origin: https://github.com/nexusformat/python-nxs/pull/12
--- a/nxs/unit.py
+++ b/nxs/unit.py
@@ -162,7 +162,7 @@
else:
self.scalemap = {'': 1}
self.scalebase = 1
- #raise ValueError, "Unknown unit %s"%name
+ #raise ValueError("Unknown unit %s"%name)
def scale(self, units=""):
if units == "" or self.scalemap is None: return 1
@@ -181,7 +181,7 @@
raise KeyError("%s not in %s"%(units," ".join(self.scalemap.keys())))
def _check(expect,get):
- if expect != get: raise ValueError, "Expected %s but got %s"%(expect,get)
+ if expect != get: raise ValueError("Expected %s but got %s"%(expect,get))
#print expect,"==",get
def test():
|