]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Python 3: print_function
authorShawn Hartsock <hartsocks@vmware.com>
Thu, 24 Jul 2014 20:33:47 +0000 (16:33 -0400)
committerShawn Hartsock <hartsocks@vmware.com>
Thu, 24 Jul 2014 20:33:47 +0000 (16:33 -0400)
Use print function if you must print, this lets us use the
library in python 3 environments.

partial: https://github.com/kevin1024/vcrpy/issues/86

vcr/compat/counter.py

index 65db4ed4a6a2a52ad8f86b4d79c89e181092774a..a28bf23099a4c3ee9a27d86b8a2b1261a715a6e0 100644 (file)
@@ -1,3 +1,4 @@
+from __future__ import print_function
 from operator import itemgetter
 from heapq import nlargest
 from itertools import repeat, ifilter
@@ -189,5 +190,5 @@ class Counter(dict):
 
 if __name__ == '__main__':
     import doctest
-    print doctest.testmod()
+    print(doctest.testmod())