Convert from "print ..." to "print(...)"
[hooke.git] / hooke / util / si.py
index 2a36bb33ff9dc94b9f7971075ecd3a3770deb51f..9d6e91068e1a91cac40d49a4b1790f6a111f7163 100644 (file)
@@ -30,11 +30,11 @@ Get the power from the first (or last, or middle, ...) value
 
 >>> p = get_power(xs[0])
 >>> for x in xs:
-...     print ppSI(x, decimals=2, power=p)
+...     print(ppSI(x, decimals=2, power=p))
 985.00 p
 1000.00 p
 112358.00 p
->>> print prefix_from_value(xs[0]) + 'N'
+>>> print(prefix_from_value(xs[0]) + 'N')
 pN
 """
 
@@ -87,13 +87,13 @@ def ppSI(value, unit='', decimals=None, power=None, pad=False):
     Examples
     --------
     >>> x = math.pi * 1e-8
-    >>> print ppSI(x, 'N')
+    >>> print(ppSI(x, 'N'))
     31.415927 nN
-    >>> print ppSI(x, 'N', 3)
+    >>> print(ppSI(x, 'N', 3))
     31.416 nN
-    >>> print ppSI(x, 'N', 4, power=-12)
+    >>> print(ppSI(x, 'N', 4, power=-12))
     31415.9265 pN
-    >>> print ppSI(x, 'N', 5, pad=True)
+    >>> print(ppSI(x, 'N', 5, pad=True))
        31.41593 nN
 
     If you want the decimal indented by six spaces with `decimal=2`,
@@ -103,7 +103,7 @@ def ppSI(value, unit='', decimals=None, power=None, pad=False):
     * 1 (length of the decimal point)
     * 2 (places after the decimal point)
 
-    >>> print ppSI(-x, 'N', 2, pad=(6+1+2))
+    >>> print(ppSI(-x, 'N', 2, pad=(6+1+2)))
        -31.42 nN
     """
     if value == 0: