[python-coards] 03/06: Use print function in docstrings

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Dec 28 14:18:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-coards.

commit ee7566c6f5825658b55fc5b196d72b945841065f
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Wed Dec 28 11:57:26 2016 +0000

    Use print function in docstrings
---
 src/coards/__init__.py | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/coards/__init__.py b/src/coards/__init__.py
index 52a52f6..069460e 100755
--- a/src/coards/__init__.py
+++ b/src/coards/__init__.py
@@ -122,29 +122,29 @@ def format(date, units):
     """
     Convert a datetime object into a COARDS compliant date::
 
-        >>> print format(datetime(1970, 1, 1, 0, 0), "hours since 1970-01-01 00:00:00")
+        >>> print(format(datetime(1970, 1, 1, 0, 0), "hours since 1970-01-01 00:00:00"))
         0.0
-        >>> print format(datetime(1969, 12, 31, 21, 30), "hours since 1970-01-01 00:00:00 +2:30")
+        >>> print(format(datetime(1969, 12, 31, 21, 30), "hours since 1970-01-01 00:00:00 +2:30"))
         0.0
-        >>> print format(datetime(1996, 1, 1, 10, 0), "hours since 1996-1-1") 
+        >>> print(format(datetime(1996, 1, 1, 10, 0), "hours since 1996-1-1"))
         10.0
-        >>> print format(datetime(1, 1, 1, 10, 0), "hours since 1-1-1")
+        >>> print(format(datetime(1, 1, 1, 10, 0), "hours since 1-1-1"))
         10.0
-        >>> print format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00:00")
+        >>> print(format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00:00"))
         10.0
-        >>> print format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00")
+        >>> print(format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00"))
         10.0
-        >>> print format(datetime(1990, 11, 25, 20, 0), "hours since 1990-11-25 12:00 +2:00")
+        >>> print(format(datetime(1990, 11, 25, 20, 0), "hours since 1990-11-25 12:00 +2:00"))
         10.0
-        >>> print format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00 UTC")
+        >>> print(format(datetime(1990, 11, 25, 22, 0), "hours since 1990-11-25 12:00 UTC"))
         10.0
-        >>> print format(datetime(1970, 1, 1, 0, 0, 10), "seconds since 1970-1-1")
+        >>> print(format(datetime(1970, 1, 1, 0, 0, 10), "seconds since 1970-1-1"))
         10.0
 
     It works with a year that never existed, since it's usual to have the
     origin set to the year zero in climatological datasets::
 
-        >>> print format(datetime(1, 1, 1, 0, 0), "days since 0000-01-01 00:00:00")
+        >>> print(format(datetime(1, 1, 1, 0, 0), "days since 0000-01-01 00:00:00"))
         366.0
 
     """
@@ -159,7 +159,7 @@ def parse_units(units):
     This function transforms all Udunits defined time units, returning it
     converted to seconds::
 
-        >>> print parse_units("min")
+        >>> print(parse_units("min"))
         60.0
 
     """

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-coards.git



More information about the debian-science-commits mailing list